When it comes to prepositions I always have a hard time getting the precise meaning in context, but I also have great expectations from you to puzzle out my confusion.
We all know what a car's engine looks like. It's compact, without any hole and one can hardly imagine a snake entering it.
Let's consider the following:
It turns out that these creatures have found a simple yet effective way to traverse the island. They hitchhike. "They love how warm car engines are," Robert tells me. "So they climb into them and end up getting driven all over the island."
or:
A 5ft-long boa constrictor was found hiding in the engine of a Mini Cooper in Oxford, UK
If I were to say it I would have used next to the engine, beside the engine, on the engine, near the engine, etc.
So, taking into account the prepositions' in and into definitions, I quite can't figure out their usage.
Best Answer
I suspect engine here is simply synecdoche or ellipsis for the entire engine bay or engine compartment— the entire space "under the [AmE hood / BrE bonnet]" where the engine block and its associated components, electrical supply, cooling system, fluid tanks, and so on sit.
Such usage is evident, for example, throughout this 2007 New York Times article about a different unwelcome passenger:
While one might imagine a snake finding its way into an intake or a disconnected hose, no one would ever make such a mistake about a rat— least of all a New York City rat— in a nest. The author is clearly talking about the spaces around the engine itself.
The Times is aimed at a general audience, which (particularly in New York City) may not be particularly careful about automotive terminology. Someone who works in the field uses more specific language—
— whereas the author of the article uses engine and engine compartment interchangeably:
Additionally, I would note that hide is used with prepositions which indicate location, not motion. Thus, your guest cannot hide into, hide towards, or hide back to even the most spacious engine bay, but can slither, scuttle, swarm, etc. into it to hide in or inside or within it.