I used the C3C 1.22 Combat Calc,
assume a 4 HP Vet Immortal is attacking a 4 HP Vet Gallic on grasslands, not fortified:
Defender Wins: 20% - Attacker wins: 39%
Defender Loss: 39% - Attacker loss: - 20%
(just the opposite, simple...)
and now - tataaa - retreat:
DRAW / RETREAT of the Gallic: 40,6%
Defender wins or at least survives to around 60%.
Even more simplified, more than half of the Gallics run away to recover, while every 5th Immortal bites the dust even on its terms with 4 attack vs 2 defense.
This clearly shows the offensive advantage, but that many Gallics actually escape.
NOTE: If Gallics defend a city, they will not retreat. Advantage to Immortals.
Now what happens if the Gallics attack the Immortals?
Gallic left, Immortal right, short notation, I am lazy:
64% win - 16% win
16% loss - 64% loss
DRAW: 19%
Every 5th Gallic retreats on the attack, and only every 6th app. dies.
As the Immortals do never retreat, the Gallics kill 64% of them and rout 19%. The Immortals killed only 39% of the Gallics and routed app 41%.
But well - Both are not supposed to fight each other anyways... a fortified Pikeman or Musketman in a 7-12 size city is a tough cookie for both, lets see how they do against a pikeman:
Fortified pikeman, city on plains.
Immortal: Wins 32,7%, dies to 67,3%
2 of 3 Immortals die.
Gallic: Wins only 19,5%, dies to 39% and retreats in 41% of the cases to try it again in a few turns. 2 of 5 Gallics die.
The same game with a musketman - defence 4
Immortal: Win 20%, loss 80%
4 of 5 Immortals die!
Gallic: Wins only 10%, loss 43%, retreat: 45%
2 of 5 Gallics die roughly
Now we could say: The Immortal costs 30, the Gallic 40 shields.
In the example above, we could save 120 shields for the Gallics, and only 30 for Persia.
The thing is, a cost of 30 has not only the advantage of being simply cheaper, it probably needs one turn less to produce. At this stage of the game, 2 turn production is likely, and an Immortal might be produced in 2 turns (15 production, idealized), but a gallic would would waste shields and still need 3 turns.
Say 20 turns production period: 10 Immortals vs. 6 Gallics.
Lets say we attack pikemen who sit fortified in a city.
(simplified) roughly 3-4 Immortals die. 6-7 left.
But also 2-3 Gallics. 3-4 left.
Sheer mass has its benefits, too. They can easily stop rioting, and larger numbers means a smaller chance for your invasion force to fall victim to an unlucky dice roll. Tank vs Spearman example.
Still, the mobility of the Gallic Swordsman is a big plus, too. Not only for retreat. I also consider a Gallic Army to be more powerful, one more attack and high movement speed.
If you are in Monarchy and the need arises to garrison some conquered cities, the mass of the Immortals makes for better defenders - but they are not supposed to be it, and well...
I just want to point out, I think the Gallics are better and prefer them, but still the Immortals are not THAT inferior, they have advantages.
Now I would be interested how Legions would perform, but their problem is that they do not have the retreat of the Gallic nor the attack power of the Immortal.
Perhaps someone has time and mood to do an analysis for them, too... but somehow I am sure that specialists are better than allrounders in a game against the AI at least. In Multiplayer, who knows - the Legions have no strength, but they are worth a normal Swordsman's attack and have the defence of a Pikeman. This can be really useful as they are versatile.