As said the earlier levels of a druid their companion compare really favorable in melee. In core, Druids make good charger builds, as they get acces to pounce through feline wildshapes from level 5 and on. From level 9 and on, if properly buffed, druids and their pets can withstand a lot of damage through Stoneskin. At higher levels they can powerattack charge in a large tiger shape and get 5 attacks in, after his companion has teared the target a new one.
Clerics start emulating and out damaging regular fighters at level 7 and up, solely through having Powerattack and Divine Power, untill then they are largely defensive through high AC and the occasional selfheal. Clerics have numerous ways to get temporary HP (Aid, Divine Power), which are preferable over CON bumped extra HP as they don't have to be "paid" if the buff runs out. Combine those temporary HP with numerous STR buffs, attack bonusses, size increases and built in ways to overcome damage resistance and it becomes clear Clerics are made to be "in your face" melee types.
Wizards have a harder time withstanding damage, but are the kings at making melee seem a laughable strategy by getting numerous ways of mobility or concealment. If they strategize to be in melee themselves they'll have to rely on other ways to get high melee damage than powerattack, typically by doing ability damage or an elemental damage of some kind while surprizing and eluding counterattacks of the enemy with invisiblilty. Forcing enemies into lose-lose situations is another option arcane casters have; by going into melee with a Fireshield up, including a stoneskin and blocking escape with a fire/stone/ice/force walls, enemies are doomed if they exchange blows with the mage in melee and will get punished by regular mage spells when they try ignore him. I think the hoops the wizard needs to jump are too numerous and high to really make them shine as melee characters in Core. A sorcerer has a slight advantage over the mage in melee, largely because of its simple weaponproficiency (and acces to the excellent spear) and their higher number of spells per day.