I'm not shomer with the shabbos (or pretty much anything) but I've never been in class later than 4pm, which in most parts of the country would get you home early enough. Plus, class is pretty much always optional, and rarely worth attending. I really don't think keeping shabbos will be a problem during the first two years, unless you have exams on Mondays...
During clinicals though I think it will be impossible to avoid breaking shabbat. Even if you are on Family med, there is a big chance you wont be able to leave until it's too late. Of course, even in Israel the medical students have to break shabbas. So i dont see why it should be a problem unless you are super-duper-ultra-orthodox (I know some people who refuse to use a can opener on shabbat because it creates a "vessel"😕)