They are balanced, as much as they can be. Pets did unbalance them, more than other classes. Pre-pet high def + HP meant melee, especially Knight and Warrior, could stay in the fight a little longer, take a few more hits, before retreating. But with pets against a wide range of enemies they never have to retreat and are OP.
But since then three things have changed. First many other classes have been buffed to make them more viable, interesting or both. Second much content released since pets includes elements that counteract the OP melee + pet combo, with anti-melee/anti-pet shot patterns and status effects.
Third and most recently enemy scaling and damage threshold changes mean melee can no longer steamroller enemies, and are no longer the only ones to get loot due to their high DPS. You can still play melee if you prefer, but any other class is viable for doing SB damage and getting loot.