JFRuser and Agricola, I agree that heavy infantry with polearms (or bastard swords or spears or lances) combined with shield walls per legion doctrine would be a tough nut to crack for both heavy cav and archers.
But then why didn't the military leaders of mid to high middle ages not use that tactic?
To me, by high middle ages the wealth and organization had returned to the feudal states enough to support a professional army. In fact, the wealth was enough to pay for mercenary armies from Schweiz and Allemande.
They did - the Saxons used shield-wall tactics very effectively (until they charged down the hill) at Hastings, and the Scots managed to repeatedly beat the English by using schiltroms of pikemen (which worked until the deployment of large numbers of longbowmen). The problem was that there was not the discipline, nor the standard of equipment, available to the average footsoldier as there was to the legionary (though as I said, one wonders whether several thousand longbowmen mixed with high-quality foot and heavy cavalry would have beaten the legion anyway). To paraphrase what jfruser says, the development of Rome is not reached again until Victorian times - its not about comparing how rich the rich were in both times, its about comparing how rich the poor were.
Also, as for artillery dont forget that the Romans did use cart-mounted light artillery called carroballistae which were, according to ancient sources, capable of precision fire at range, and which were taken into battle.
Also while we are talking about Roman history, its either Livy, Suetonius or Tacitus for me.