I realize they're commoners but at 4 HP, an encounter with 2 regular size (tiny) rats could be fatal. Even if the commoner survives, he/she is going to be at 1/4 to 1/2 of their full health. So seriously to critically injured by 2 rats. Is that correct?
The game is really designed and balanced towards heroic roleplay - and not towards a realistic simulation. When heroes are in the heroic tier they've got dozens of hitpoints.
When you look at the game on the scale of things that are a mere fraction of the power of those heroes, the math begins to break down. There's simply not enough room in the very low power strata and not much of the designers valuable time to be concerned about fine-tuning balance of threats that will no longer be credible by time our characters are 3rd level.
I do recall a similar discussion in the days of 3.5e: Commoner vs Cat that translates well from 3.5 to 5e - it's worth looking at the mathematical analysis.
Also, I should add that this is an extension of the classic commoner vs cat conundrum that dates all the way back to the earliest days of D&D.
5th Edition D&D is built with a couple assumptions (the DMG helpfully points out what several of those assumptions are right in the first chapter, under "Core Assumptions"), one of the big ones being that the world is reminiscent of Feudal Europe. While you can easily change the flavor of a particular setting, it helps to remember that when you look at the stat blocks. When you're looking at the Commoner, that's not a 20th century college student- that's Geoff, a 13th century peasant who mainly consumes vegetable soup that's been sitting in a pot for the last eleven days and beer. Those two rats- the ones that Geoff just spotted trying to make off with the salted pork that he was going to have as a snack? Those aren't pet rats. Those are wharf rats, and as Tiny creatures they sit in the same weight class as weasels and cats, and they live in an era when rats wiped out a quarter of the European population.
So how does that play out? Geoff has a stout stick he uses to beat cows and small children, those rats have needle sharp teeth and the disposition necessary to use them. Geoff has enough hit points that he could (barely) survive being stabbed with a dagger, so long as nobody stabs anything important. The rats have enough that they could (barely) survive a bite from each other, with the same caveat.
In the first round, Geoff has a 60% chance to hit one of the rats, and his malnourished farmer's muscles are more than enough to kill any rat he hits, even one that's a foot long. The rats each have a 50% chance to give him a nasty bite- if they both get to move before Geoff, he will probably take a point of damage before killing one. At that point, a rat that hasn't been cornered will flee, and Geoff, nursing a bite wound that will likely scar, can curse and throw his stick at the fleeing rodent.
That doesn't sound very unreasonable, but let's look at it another way- Geoff falls to the ground, unconscious, if bitten by 4 rats, and likely dies if swarmed by enough of them. Does that make sense?
...Yes. That is what would happen, after all, if Geoff ran afoul of a Swarm of Rats, which deals an average of 7 hit points of damage. From what we know of the regular rat stats, the damage dealt by a Swarm is the equivalent of 2d6 rats sinking their teeth into the target.
The answer, then, isn't that commoners are all that squishy- they have roughly as many hit points as a level 1 wizard, after all- it's that even regular rats are indeed that vicious.
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?"
There is a rule in the PHB that strongly suggests starting all your PCs with max hit points for the 1st hit die.
Under "Hit Points and Hit Dice" (PHB 12), it states:
At 1st level, your character has 1 Hit Die, and the die type is determined by your class. You start with hit points equal to the highest roll of that die, as indicated in your class description. (You also add your Constitution modifier, which you’ll determine in step 3.) This is also your hit point maximum.
Since all PCs in my campaign start with max hit points at their 1st Hit Die, so do all commoners as well and all 1 hit-die monsters. So with 8 hp they are not that strong an opponent, but not that squishy either, and it makes for a more realistic and interesting setting. So for an 8 hp farmer vs 2 rats with 3 hp each, the farmer will still have the upper hand as the rats will need to hit him 8 times to down him as opposed to the farmer killing one with each blow.
To me, it is totally unrealistic to have just 2 normal rats being a threat to a commoner or farmer! He probably fights these critters every day and should have easily the upper hand against an even greater number just armed with a stick. So use max hit points for the 1st hit die, and everything starts to make more sense.