Both are really valuable to teams and the 2 of them are extremely essential to your core (Pyro, Medic, Heavy, Demo). The Medic role throughout HL are different for each team in the sense of communication. I believe your medic should shot call for you team and I do it while playing medic or spy. Reason being, you should let your offensive classes frag out and communicate with each other since your solly/scout combo should be helping each other. Your core combo should be protecting you and there's some other micromanaging things I could explain but it'd take time since I'd discuss about positioning and etc. Also, I believe now you have to have a certain amount of games played for some sites like TF2 center before you can pick medic due to people just picking the class and just being an uber bot rather than working and communicating with the team.
tl;dr It's easy to be a good medic but hard to be a great medic.
For heavy, it's all about the aim and working with your medic. Again, your communication with your core is essential since you're considered the front line player for Payload maps and some 5CP maps. There are very few cases where you as a heavy are passive such as the last point in 5CP maps where you could go Natasha heavy if your team likes running a step up like that. I think heavy is one of those classes though that with some above average aiming, you can carry your team if you work well with your medic. (Heavy is technically the easiest class to play in TF2).
Best of luck with your future endeavors. TF2 Highlander has been the rogue within the TF2 community but it's extremely fun to play. I've made a lot of friends and still talk to some of the major TF2 theorycrafters/celebs. (At least within the spy community)