With this subject I would have to say that there are factors which makes them both of a class that takes a lot of skill.
When you start getting the hang of soldier you will start being able to rocket jump around; this is where I think needs the most skill. With each item you equip, you can support your team (Buff Banner) or help with mobility (Gunboats) and in return cost you some protection and could be your downfall (Shotguns). So Soldier really makes you think ahead of time in a battle field and make you simulate what is the best loadout to choose before actually running into the battlefield with it. Including with that when you start rocket jumping around you'll cause a lot of damage to yourself, so it could be possible to come into the middle of battle with only half of your health.
The Heavy is a simple class, but at the same time one of the most hardest. You're one of the most slowest classes which causes some of the highest damage in the Team Fortress class selection. But with your slowness it also makes you ponder which loadout to use ("Should I equip the GRUs for a boost in speed and take mini crit damage or the KGBs to finish off weak enemy and gain crits"). On top of that you'll be the number one target to take out because of your high health and DPS. So you're basically fighting a army by yourself and your (possible) medic.
P.S. Anyone with a medic is hard to kill; the Soldier and Heavy being the usual choices for a medic to pocket.