The undertray, if properly designed, should not impair engine / gearbox cooling, but help them greatly.
Example:
On my car, there's in front an undertray running from front splitter lip to just after front axle subframe, at the front end of the catalytic converter. It can't be flat, due to wrapping the engine oil sump and gearbox, what matters is that it's quite smooth, no bits and bobs dangling in the airflow.
Car is pretty low to the ground, minimum ground clearance is in the 80 mm (3.15 inches) range below the front axle subframe. The undertray acts like a funnel, dropping smoothly the ground clearance from the front lip to the lowest point below axle.
As Bernoulli's principle tells us, if the speed of the airflow increases, as the air is squeezed in a funnel,
the pressure decreases.
This is good for 2 reasons:
1. Decrease in pressure exactly below driven front axle cancels part of the car's lift (does not "create downforce", this is not possible in a road car), which aids high-speed stability;
2. The air enters the engine bay in a high-pressure area (
the pockets below the middle line of the front bumper) and it finds the path to exit into a low-pressure area, at the rear side of the front axle.
The drag of the cooling air flow is huge. According to SAE paper 2004-01-1307, 33.4% of all drag in a road car comes from the flow of air in the engine bay (including radiator, intercooler, oil cooler etc). The entire exterior of the car barely makes 31.7%. A car with no airflow through the engine bay may be shaped like a brick and still be more aerodynamic than most cars on the road. (This can't exist in the real world, even electric supercars need some cooling for the battery, motors and brakes.)
So, if we draw the air from a high-pressure area, exhaust it into a low-pressure area and add heat in the middle... we just have described a jet engine
It increases greatly the airflow through the engine bay and therefore improve cooling.
Real world testing
Engine coolant temps in the 85-88ºC (185-190ºF) highway in cool weather, 90-93ºC (194-199ºF) hot weather, 93-96ºC (199-205ºF) city driving, occasional jumps in the ranges where fans go into full speed (over 102ºC/216ºF) in stop and go traffic. Intake post-intercooler air temps as read at the manifold 13-15ºC over atmospheric temps.
Incidentally, more than 80 years ago, Ettore Bugatti and Louis de Monge thought of the same problem for the 100P prototype aircraft: how to get rid of the drag generated by cooling system's ducts, funnels and scoops?
Solution: think outside of the box. Drop everything people knew about fans, ducts, funnels and scoops... use the pressure differences created by the act of flight itself.
Therefore,
the 100P drew air for engine cooling at a high-pressure edge (the front edge of the tailfins), flew it back to front into the fuselage and left it to exit in a low-pressure area, at the wing trailing edge. This not just allowed a very clean shape of the fuselage itself, but it even added a bit of thrust in flight. They expected to hit 500 mph with only 900 hp, if some minor unpleasantness called WWII didin't happen.
US Patent no. 2268183, filed by Bugatti on March 16, 1939. Granted on December 30, 1941, when people were too concerned with some pesky Mitsubishi A6M Zeroes in the Pacific to pay too much atention.