You shouldn't necessarily roll out that interaction; you'd just make a judgement call: "Is it possible for a rat to threaten this commoner in this scene?"
If it's just some random scene, then the answer is probably no and the commoner would just shoo away the rat.
If its an encounter with some player characters and it's like, "The PCs get attacked by feral rats! And there's a peasant that might get eaten," you might roll it out. More likely you'd just narrate something like, "The peasant falls to the floor in a panic; the rats tear into him viciously, and his screams are cut short. The rats stream from his body, bloodied and shaking in madness. They move towards you. Roll initiative."
Basically, D&D, especially D&D fifth edition, doesn't really simulate a setting. Setting is tertiary to D&D; the most important aspects are mechanics and after that atmosphere.
HP is mostly for the player characters. A commoner has 4 hp because that is roughly how difficult it is for a PC to knock them out or kill them.
Even then, note that is just a default commoner, i.e. a random extra. In a movie, it wouldn't even be a guard that the PCs take down; it'd be a random civilian they knock out in a scene, drag into an alley and then steal their clothes so they can, I dunno, do what they need to do. If you had a peasant NPC in your campaign that you wanted to be a reoccurring NPC, you might not even bother with stats; you'd just wing it if the PCs tried something. "Alfredo the peasant screams and dies as you run a sword through his gut. Cause he's a civilian and you are a soldier. Ok, now what do you do with the body?"