The advice to choose a balanced suit over an unbalanced for trump (when speaking of both majors or both minors) should be read to include the more nearly balanced over the more unbalanced suit. Declarer had no chance in six hearts here. There's not even a finesse to take, or at least not one that'd work, with West's A J 9 holding sitting over the 10. But note that making the more balanced spade suit trump would've given declarer a reasonable chance for the slam.
Let's assume the same opening lead. Declarer wins in dummy and leads the Q of hearts into West's A. If West declines the trick, declarer leads the suit again, or if West wins and leads, well, anything, declarer wins in dummy, leads to the K of hearts and ruffs a heart. The hearts might have split 4-1, allowing East to overruff, but they didn't. And anyway, that'd hardly be a good reason to choose hearts for trump.
[momths later] I'm not sure what I was thinking here. I'm not retracting the principle of the more nearly balanced over the more unbalanced suit. Six hearts clearly has no play here, but then, six spades is in the same boat. Declarer can yield a heart trick to the defense, win the second round and ruff the third, yes, but unfortunately he must either ruff with the 9 or 5, which can be overruffed, or with the A, which will allow West to set up one of his trump for a winner. Yes, there is a double-finessing position, playing double dummy: Declarer ruffs the third round of hearts with the A, leads the 9 of spades toward the K Q, pushing it through if uncovered, covering if West plays the 10 or J, coming back (on a club lead) to pick up West's second honor with a play through the Q 8. But that's pie-in-the-sky and hardly recommended.