First, the unit unlocked by Iron Working should be a "phalanx" or "testudo", which gets a defensive bonus against ranged attacks. The current iron unit simply has nothing going for it other than a slight, very temporary, strength edge.
Second, reduce the anti-mounted bonus that spearmen and pikemen receive. +50% and +100% is ridiculously over-the-top when the typical bonus ranges between +10-20%. They shouldn't even have the bonus on attack: the wall of pikes isn't for charging.
Third, do not allow ranged to inflict damage when they are engaged in melee. They don't do much, but since they have often already injured the melee units attacking them. Melee units shouldn't have to weather attacks reaching them, then take more damage in retaliation.
In summary, people need reasons to diversify, and the game right now hammers players over the head with disincentives. I'm not going to field a mounted unit just to be effortlessly killed by a resource-free pointy-stick unit. I'm not going to field swordsmen simply to walk into a hail of arrow fire.