A sword guy running at archers should never get near them if cover was not used. Melee will always be behind ranged characters.
I agree that it's ludicrous to try and impose realism on RPG battle mechanics, or you might as well throw more than half of this game out the window before you even get to the concept of fantasy monsters and magic. But just for kicks, Id like to point out the flaws in this assumption.
I agree a single "sword guy" running at a line of archers would never get near them, because massed arrow fire increases their effectiveness and odds of hitting something. Even if he did, what is he going to do when he gets there, with a dozen guys against one? But the game doesn't model that. It models one or two "sword guys" charging one or two "arrow guys".
Bows are not automatic rifles. They are used to wound and debilitate an army with massed arrow fire. Even if a single archer is skilled enough to hit a moving target (not a simple thing to do even with modern firearms) inside of charging distance with the probably single shot they'll have time for-- unless he gets very lucky (and despite what you see in movies), it's unlikely to be instantly fatal or crippling to that sword guy before he gets to you and shoves that wicked hunk of steel through your chest.
If you're armed with only a wooden bow and arrow, and theres a guy with a sword or an axe within charging distance of you without a line of infantry in front of you for protection, chances are you're already dead. If you're a good enough shot, you can take solace that there's a good chance that sword guy might die sometime after he kills you from blood loss or infection.