Answer from Esri Canada tech support:
The behaviour you are bumping is a known limitation of in memory
layers. They actually don't have a shape_length field to access. For
example, if you add the output of the XY to Line tool to your display
and you then open the attribute table you shouldn't see a shape_length
That being said, I believe there is an easy solution.
In your model if you add a "Add Geometry Attributes" tool in between
the XY to Line and the Layer of Zero Length Lines tool and ask that
Add Geometry Attributes tool to calculate length it will add a LENGTH
field that you can leverage in the Layer of Zero Length Lines tool.
In my case the simplest change is to just not use in_memory at all as the performance gain is negligible. I was using memory as a shortcut to not adding a Delete step at the end of the model. The information for what is going on though is important and will surely crop up elsewhere.