Methinks OP should seriouly think long and hard about comments like the one above. When the evil ruler died/was killed, it's highly doubtful everyone in the kingdom just sat there wallowing in their own self-pity. In reality, any vacuum is naturally filled. If a corrupt leader is eliminated, there will always be SOMEONE (or multiple someones) there to take his place. Whether it be a former subordinate or advisor, another ruler from one of the neighboring kingdoms, a successful merchant from the area, etc. I can't help but point out that you said the king had been engaging in many wars with other lands, certainly one of these enemies would be interested in invading to take over his lands if he's killed?!? And it sounds like he's had his resources spread quite thin. The people are dying en masse, they are destitute and starving, it does not exactly sound like a difficult place to assume power. So Evil King Dude gets killed. The hero comes out of hiding to take over... Even if he meets some villagers, proves his identity, and gains their support, what power do THEY have? They are powerless, hungry, beaten down. And certainly, by now there would be at LEAST one more contender to the throne. This is the conflict that will make the story interesting and lead to character development. How will he overcome this??? On top of that, there will be many neighboring kindoms the previous king was at war with who certainly will still be upset with this Kingdom! It's not realistic that they will simply decide to forgive all of the conflict, loss, and death! He will not only have to fix things for his subjects, secure the throne through deeds and/or force, ensure economic, agricultural, and defensive prosperity, but he will also have to smooth things over with his neighbors!!! If he just shows up, passes a blood test, and settles into his throne happily ever after, that's not much of a story. I'm truly only trying to provide helpful criticism from a potential reader's perspective. This is how readers are going to think. I hope it can help you brainstorm some ideas!
As a history student I don't see it as a good battle for power without more than 5 factions, at least two of them supporting the same guy but fighting each other.
I suppose the question has to be asked as to why he's seeking to prove himself to the peasantry, who, as has been said, don't really have a choice in the matter anyway. You could indeed go the whole hog and have him prove himself as a royal to other aristocrats by arbitrarily shooting a peasant in a very off-hand way (who turns up at his coronation, leg in bandages and happy to see somebody who remains, by their standards, a wise and fair ruler?) Seriously though, if it's a simple litmus test, then in the days before DNA screening there were two things- there was magic and haemophilia. Magical tests are either Herculean labours or curing scrofula by touching an afflicted peasant (he could cure crossbow wounds this way, too). Haemophilia was a common genetic trait of European royals for a bit, just jab him with a pin and see if he bleeds out!
Maybe the OP was just trying to write a fairy tale, not a socially and psychologically realistic novel...
He's sent to kill an old corrupted and twisted person who is some kind of necromancer/alchemist/sorcerer. He saves a prisoner from the guy's dungeon, and they become friends. After they kill the old guy, the friend from the dungeon asks for a powerful magical item to save his SO. It's a trick, really the friend is evil and the test, not the old guy.