I always thought that their undercoat actually protects them from the heat too, and that it's worse to shave them... Am I wrong?
Undercoat protects them, but only healthy undercoat. This time of year, double coated dogs are blowing their coats - dead undercoat is being replaced by new undercoat. The problem comes when the dead coat just stays there, mingling with the new undercoat and the topcoat. I've heard people explain shaving their dogs by accusing "you wouldn't want to wear a fur coat outside right now, would you?" But the problem with a fur coat would be the coat part that prevents air from getting to the skin, not necessarily the fur itself. A thick, dead undercoat prevents air circulation and temperature regulation. Frequent undercoat raking is good. A good bath with conditioner paired with a velocity dryer is the best bet for getting the dead coat out.
If you're really concerned, you could shave his belly...