I think the HD2 is better than the TG01 in most respects. The screen is slightly larger, it has more memory, the case is actually slightly smaller (despite the screen size), and HTC's "Sense" customisation is better than Toshiba's weird stripey GUI.
There are two reasons why you might prefer a TG01, though.
The first is if you need a resistive screen: for example, if you want to be able to easily use a stylus (or any convenient object that happens to come to hand) to press the screen with, or if you want to be able to use while wearing gloves; neither of these is possible on an HD2. Of course the HD2's screen being capacitive has an upside: it supports multi-touch, inluding pinch-to-zoom in some applications.
The other reason is if video playback is a big priority: the TG01 comes with a custom version of Coreplayer which is able to make use of GPU-acceleration; the commercial version of Coreplayer won't be able to do that on an HD2, so performance won't be as good.