Hopefully one thing we can all agree on, regardless of whether we think head size matters, is that GLASS JAWS EXIST in Boxing!
Overall size/dimensions don't matter much, but heavily boned/reinforced heads like Hagler's make a huge difference. The density of his cranium was off the charts, and to add to it, look at it from the side and notice the curvature. It's almost like the hull of a mine-resistant military vehicle, basically providing an explosive with an angle that will soak up and deflect the blast.
Even if your head is small, if it's very round and smooth and you have good head movement it can make it difficult to land a flush shot. A blocky/square rectangular head is going to have a lot of angles and easier to clip with a looping shot. A strong neck can help absorb the shot if you can't dodge. Strong legs can be like shock absorbers to keep you on your feet. Doing tons of cardio can give you the 2nd wind needed to endure painful body shots or to get off the floor after a knockdown.
I think there is a correlation between the cranium size and punch resistance. There might be exceptions to the rule but I think they are few. The two best p4p chins in boxing now, Canelo and Golovkin, have relatively large domes for their body size. Shakiest chins currently? Joshua, Price, Khan? All pea-heads, relatively speaking.