There is an interactive
Contrail Applet (Java - ignore the warning, just run the thing!).
Position the "Environment dot at about -40°C and 10 Pa, hit the [Fly] button and move the Environment dot horizontally to 15 Pa.
First, no trail until you move the dot, then, after moving the dot a persistent trail appears!
It is very unlikely that in level flight and clear sky there will be very much, it any, ambient air temperatire change along the flight path. To get a temperature change you need to fly into another air mass (cross a front with all its attendant weather), or either climb or descend.
However, there can be changes in RH without there being a front, weather, cloud or anything. It is just a change in RH. That is what is being simulated here - a change in RH in level (at the same temperature) flight. The RHi goes (in this example) from 76% to 114%. (This is RH with respect to Ice, not Water.)
No trail in the 76% air - too warm and not moist enough; you can experiment with that in the Applet.
Persistent trail in the 114% air - by increasing the RH you have managed to get water saturation at some point (mixing line crosses the "Water" line - experiment with that, too), the condensation froze, but now it can't evaporate because the RHi is above 100% - the air is ice-supersaturated.
This Applet is such brilliant teaching/learning tool. It is a pity that there is warning pop-up on it. When referred to it, and this sort of thing happens, suspicious minds imagine the worst and come back full of bluster.
Anyway, that is the explanation - the planes flew across a fairly sharp boundary between air with different moisture contents.