Taking a step back, the overall goal of the rocket engine is to convert very hot gas going in every direction (combustion products) into very hot gas going in primarily one direction.
The latter half of the process is a job for the rocket nozzle. The rocket's performance is dependent on the ambient air pressure.
An underexpanded exhaust is bad because the flow can become unstable and 'stick to' one side of the nozzle, kind of like when a shower is barely on and just dribbling water. An overexpanded flow is bad because the gases are spread out and not all going in the same direction, leading to wasted kinetic energy.
As the rocket goes higher and into lower air pressures, the optimal nozzle size changes. Most rockets get around this by having multiple stages, where the first stage is optimised for atmospheric flight, and has relatively small nozzles. The second stage has engines optimised for near vaccuum conditions and has a much larger nozzle. The somewhat counterintuitive feature of this is that larger rocket nozzles don't necessarily indicate a more powerful rocket engine.
Below is the silhouette of the same engine, the Merlin, for vaccuum, for 1 atm and a hypothetical one for 2x air pressure (that I just made by guessing).
The higher the atmospheric pressure, the smaller the rocket nozzle needs to be.
Launching from under the sea, I suspect that using a rocket would be much less efficient than relying on, say, buoyancy or propeller engines. I do know that some nuclear subs can launch missiles, though I'd have to check if they can do that underwater. As to launching from the depths of Jupiter's atmosphere, well that's just silly. The temperatures and pressures are just too high for anything to maintain a shape that humans would recognise. Besides, it takes about 33,000 m/s to get into low jupiter orbit, which is more than what chemical rockets can generally provide.