The liquid-cooled V-12s in use during WW2 were primarily developed for military use; later civil uses were largely on extemporized transport aircraft, like the Lancastrian. Conversely, while the first US radials were developed at to a USN contract, they soon completely replaced liquid-cooled engines in the commercial arena, where reliability, long life, and efficiency were of paramount importance. Considering that cooling drag is a significant factor in any piston engined aircraft, if the drag of a well-designed radial installation was as much worse as some people here seem to believe, they would not have driven liquid-cooled engines out of the commercial market. The V-12s would likely have survived if they could demonstrate significantly better sfcs, and they could not do that, either: radials, in cruise conditions had sfcs of about 0.38 to about 0.4, which is about as good as a spark ignition engine can get.
I think the primary reasons that radials get dissed so often are that the V-12 aircraft looked more streamlined and faster (probably more because "streamlined design," as in Raymond Loewy, was fashionable) than radial-engined aircraft and the P-51, which was probably the cleanest piston-engined fighter to see service had a V-12. With the exception of the P-51, which had Cd,0 about 15% below any other piston-engined fighter to see service, the demonstrated values of zero-lift drag (Cd,0) for all piston-engined fighters clustered between about 0.021 and about 0.025 with no significant difference between V-12 and radial engined aircraft.
We are all getting a bit mixed up here. The key is the difference needed for a
military engine. Commercial ones were (and still are) optimised for basically a single altitude and power output, with little variation but for take off and climb. In this case the air cooled radials were attractive, not in the least because lot more work on them for the
commercial market had been done, plus the aircraft manufacturers were used to them.
Commercial liquid cooled engines had, for commercial aircraft, seen little development.
For land transport, liquid cooled engines very quickly became dominant for similar reasons as to
military aircraft engines (though if jets had not came along I think that liquid cooled aircraft engines would have dominated the commercial arena after 15 years or so, particularly when the need for greater fuel efficiency became imperative).
That is, wildly varying power loads and the need for occasional very high power settings. In this case basic thermodynamics takes over.
At high power settings air cooled engines struggle to get rid of the heat, at extreme power levels they can't (see caveat below). This is made worse with high boost levels, where a small engine is effectively acting as a much larger one, yet has a smaller mass to absorb that heat.
In an air cooled engine, ran at the highest power levels, beyond the normal cooling capacity, the only heat sink available is the engine (and oil) itself. With a liquid cooled one you have the mass of the coolant which is a better heat sink than the bare metal of the air cooled one.
If you took a small air cooled engine (say the same as a Merlin's 27 litres), boosted to the same maximum (combat rating) level ... it would melt real fast.
Secondary effects come into play, that is localised 'hot spots' around the combustion chamber. Again, with no heat sink to spread out the heat, except the metal itself (and the oil to a certain extent), it will quickly melt. The water/etc mixture quickly carries away the excess heat and even if the thermal load is ultimately higher than the cooling system will handle (say at max power) it will still cool those hot spots.
This is why air cooled engines are known as 'hard' engines, while liquid cooled ones as 'soft' ones. To prevent that (very) rapid combustion chamber meltdown typically the mixture is richened far more than is necessary for a liquid cooled one (later on water injection was used too).
Hence several things: one you can't make a similar sized air cooled engine, boost it to the same levels to get the same power as per a liquid cooled one. To get the power it
has to be larger.
It's fuel consumption for the higher power settings will be greater, (a) because of the greater size and lower volumetric efficiency and (b) the need for richer mixtures.
Cooling caveat: all engines have a cooling system rated for a certain range of power levels, going above it means heat builds up.
Now you can make an air cooled engine with tremendous cooling capability (Porche as an example for the 917 and the like), but it costs a lot of money as it is much more difficult to do (plus you have size and volume issues). Plus you then have the issue then of over cooling for lower power settings.
With a liquid cooled engine it is simple to vary the cooling ability and keep the engine at an optimum temp across a far wider range of power settings, while still maintaining a better 'extreme' power setting capability and reducing hot spots.
Basically the Merlin (and the Allison) was designed from the start as a military engine, capable of widely varying power settings, including extreme levels for periods of time.
A side affect was being able to run at very lean levels (ie high combustion chamber temp levels) and enable very good cruising fuel consumption.
The big radials were basically militarised commercial engines and one result of the compromises made to achieve the performance required, was far greater fuel consumption for a given power level.