Having a good roommate > living alone > having a bad roommate.
Agreed. There are two major benefits to living with roommates. One is reduced cost, which is inarguable, while the other is companionship, which is really hit or miss. You're taking a gamble every time you live with a random roommate (and they're taking a gamble on you too). If your roommate ends up being nice and becomes your friend while also being relatively clean and quiet and stuff, it can be a huge benefit, especially in an environment like medical school which is pretty intense and can drive you insane at times. One of my 2 roommates is my classmate and probably my closest friend at school and it has worked out very well, fortunately.
On the other hand, having a bad roommate can really put a damper on things. I would imagine the chances are less with medical students but you'd be surprised about all the stories you'll hear about messy or rude or downright weird people, even in med school. Living alone has a lot of benefits that are hard to overlook -- total privacy, you can keep the place as neat/dirty as you want, as quiet/loud as you want, you can set up everything the way you like, you're in full control of the thermostat, chores, etc. There are a bunch of small things that come up when you live with other people like arguing over the temperature or doing laundry at midnight or not helping out with chores that can be a source of frustration.
If you can afford it and you feel like you'll be able to still have fun with classmates without having them as roommates, then live alone. If you'd like to save money and have the companionship of another classmate or two, then live with roommates. See how it goes the first year and then adjust accordingly for later years.