Hollow Knight is by far my favorite game for a lot of reasons, one of which being the lore in the game. It's set up like Dark Souls with how vague and asks you to figure out a lot of side bits yourself such as the Pale King. You find his shell in the White Palace to get his White Fragment to complete the Kingsoul charm and be able to fight the Radiance and get the true ending to the game.
The Pale King is labeled as a villain by many players and while I don't believe he is the best person in Hallownest, I wouldn't classify him as a villain and there are a couple reasons for this.
The first is regarding the kingdom of Hallownest. While the Fungal Wastes and Deepnest are on the world map, they don't belong to Hallownest and aren't under the Pale King's rule. The spiders of Deepnest attacked and destroyed the attempt to make a tram into their home to which the Pale King did nothing to retaliate and the mantis tribe of the Fungal Wastes were willing to fight to keep what was theirs. The Pale King is a God who could've just waltzed in even in the weaker state of the Pale King form, and forced them under his rule, but he allowed them to keep their sovereignty.
The White Palace gauntlets to get to the Pale King and to the memory explaining with the Hollow Knight failed, exist within the world of dreams where the Pale King fled to. It is more likely that the spikes and saws were put there in the dream to make sure that only someone who could actually make it would learn the secrets of the Pale King. Also, I believe it is more likely that the Pale King hid in the dream, not to hide from.the Radiance, but rather from the Void with which he had tampered with and only did so after the Radiance had thrown her temper tantrum and infected most of Hallownest of which the Soul Master had already given up finding a cure for in search of immortality which the Pale King condemned.
The Hollow Knight...the Pure Vessel and the Birthplace Memory. Some people seem to believe that the Pale King murdered the impure vessels and cast them into the Abyss, but this doesn't explain why we find our own egg down in the Abyss or why we survived the fall when the others did not save for the Pure Vessel. Now, I still understand the cruelty of the Trial of the Abyss, but he intended for the vessels to rise from the Abyss rather than cast them into it. Based on the lore tablet at the door to the Abyss, it leads me to believe the Pale King is truly ashamed of what he did, bit rationalized it through what the Hollow Knight would do for the people of the kingdom by sealing the Radiance away which of course didn't work as planned.
The moth tribe that worshipped the Radiance did in fact turn their back on her, but they did so willingly according to the Seer. The Pale Wyrm, who became the Pale King to be like the bugs of Hallownest, was a brighter light who brought progress and civilization where the Radiance had let her subjects remain ignorant. While his faith spread, he allowed other faiths as seen by the mosskin still worshipping their goddess, Unn for however long after the fall of the kingdom.
Again, I want to make it understood that I do NOT believe the Pale King is a good person, but I also don't believe he's the monster people make him. He is a character that embodies the adage "The road to hell is paved with good intentions" and he's not the only bad guy in his plans. Lurien, Monomon and Herrah agreed, Harrah doing so in exchange for a child. The White Lady, another God and his wife, agreed to the plan but holds no ill will towards her husband, and the five knights allowed the plan to go through. I understand the hierarchy that comes with royalty, but even his queen could have asked him to find a less extreme way such as maybe making a Hollow construct like the kingsmoulds. He's not a bad person but did something horrible in an effort to save the people who worshipped him and looked to him for guidance.
ns 15.158.61.50da2