The burgers you refer to (rare, medium rare) are no more "under cooked" than the well done ones you like are "over cooked." Temperature preference is a subjective parameter. I may critique a restaurant for not delivering a burger as ordered, but if it is delivered at a predetermined temperature (In-N-Out, Five Guys, all the slider joints I have reviewed) then I judge the burger for what it is. And, for the record, while I like my burgers rare (and my steak black and blue), I have given plenty of positive endorsements to burgers cooked all the way through. In fact, of my last 14 reviews 10 of them have been of burgers that were cooked medium or beyond. On the occasions when I review burgers that are rare, I often note on how I think they will be when cooked further.
As I understand it, there is connective-tissue (collagen) in meat that, when raw or undercooked, is fibrous and tough. For me, chewing meat that is raw or undercooked initiates a bit of a gag reflex from that tough, fibrous chew. Certainly grinding meat (steak tartar) or slicing it thinly (carpaccio) combats this, but my preference is to do away with that feeling all together. You can do that by adding some heat, a.k.a, cooking. Raising the temperature of the meat turns that tough collagen into fluid (or fluid gelatin). That takes a good bit of temperature all the way through the patty, but what is also happening when you give it all that heat is that moisture evaporates out of your patty (which I think is bad). Too much heating makes for a very dry and mealy burger with lots of the fat and moisture, rendered out of it (searing doesn't "seal in" the juices). The mouthfeel of this burger is much less appealing to my fat and juice-loving self. As it happens, you can phase shift that tough connective-tissue at the temperature (that most folks call) medium rare. So the answer for me is to stop cooking at that temperature to maximize the connective-tissue breakdown and minimize the moisture loss. Not too cool, not too hot; a happy medium (rare).
Cooking food on a high flame kills almost much of the organisms. It is always recommended to wash the food items properly before having to eat them. And after that always cook them properly and avoid any under cooked food.