On some backpacking trips a car could be left for a couple of weeks, what can I do to ensure that when I return the mice aren't inside and the squirrels are leaving the wiring alone?
Stop coating your wires with peanut butter!
In all seriousness though, squirrels can and will eat wires. However this is a very unlikely occurrence, as noted by ShemSeger in comments. I have known exactly ONE person it ever happened to and the car was at their house, not a trail head.
You could discourage most pests by putting mothballs in your engine compartment (after it has cooled). Of course mothballs are toxic and it would be vitally important to remove them before you drive away lest you poison yourself on the fumes. Most other rodent deterrents are lethal (traps, bait) and it would be pretty unethical IMO to use those in this situation.
Outdoor activities all have risks and you have to weight the likelyhood of the risk coming to fruition against the cost and effort of prevention.