No I think you’re looking at this wrong.
They thought too much sun was bad for you because back then tanned skin was considering a mark of being poor and pale skin was a mark of being wealthy since rich people didn’t have to work outside.
They also had puritanical Victorian notions of modesty and covering up.
There was no knowledge linking sun exposure to cancer or negative health effects. People in the past indeed were ignorant on many things.
Pretty sure a bad sunburn sucked back then as much as now, and was something one tried to avoid.
People were aware of heatstroke and sunstroke before the Victorians. There's biblical references to heatstroke and even in Roman and Greek texts.
That's the thing about traditions and Chesterton's fences, you don't need to know why they work for them to work.
This is silly.... most of the world didn't live in england.
All cultures (including mine), have a way to warn kids, or adults for not to stay too long in the sun. From normal sunburn, to feeling light-headenes/fainting due to heat excaustion, etc.
In the winter was the opposite. (stay in the sun to get some sunlight and not get sick).
So, they knew, and had nothing to do with 'class'. Also, they knew some sun was good/beneficial, especially during the winter.
Or rather, linked to completely wrong negative health effects that were just “common knowledge” thus requiring no actual evidence like:
People with light skin should always wear a hat that fully covers the head/face in tropical/equatorial climates (okay, good so far) or else the powerful sun rays will penetrate the skull (?) causing brain damage that will make you go insane (!?!?)
Victorians may have inadvertently protected themselves against excess mortality due to melanomas with their pith helmets, but it’s pretty hard to argue they were actually “correct” with modern hindsight considering the entire chain of reasoning was wrong.
(For example, you see this in Kipling’s writing where he’ll randomly include an ominous case of some guy who forgot/lost his hat and promptly had to be committed to an insane asylum, as one does).