How is the F-22's nacelle/engine bay ventilated?
The exact details of the F22 are classified. But the more likely scenario is the engine has a cold bypass air gap between the afterburner inner wall and its exterior shroud. From all the close-up shot of its nozzle, the thrust vectoring nozzle and the emergency arrestment hook fairing is lined with some sort of refractory materials and need no special cooling and the serrated nozzle fairings on either side of the nozzle seem airtight and have no place for a cooling air stream outlet. Plus, we see no scoop on the front of the aircraft as an inlet for engine cooling, and the scoop, should it exist, must be quite large. I say this is the most likely scenario because it's the least heavy and complex solution to engine cooling. And let us do not forget small cavities with a diameter in the range of millimeters is the most effective radar wave reflector/scatterer.

A less likely scenario is the engine is cooled by fuel, just like the avionics, the radar and the AC for the pilot. The fuel is then cooled first by the sheer amount of wing area as a radiator and second by a pair of hidden air-cooled fuel cooler. (I won't tell you where :))