>>96226085 (OP)
>Could the earth militaries hold out own against codex armies
Yes because James Workshop can't into math and is bad at tactics, strategy and military technology.
This is why imperial guard that is using early cold war/late ww2 vehicles and tactics ranging from pseudo napoleonic warfare to early cold war somehow can overcome all crazy shit like nids, orks, necrons and even daemons.
Since straight up inferior army with inferior tactics and equipment can somehow overcome space enemies earth armies can too.
Just to give some examples of how badly written imperial equipment is, Land Raider one of best armoured vehicles in Imperium have armour that ammounts to 300mm of "conventional steel" modern atgm penetrate 750-1000mm after ERA, leman russ top speed in 35km/h so slower than most WW2 tanks and slower than all MBT,basic apc Chimera despite being just well armoured apc(still easly penetrated by every rpg) armed with equivalent of heavy machine gun, weights 40t, weight simlar to MBT despite being battle taxi for squad of infantry that provide less firepower than IFV, basilisk maximum firing range is 16m, that could be considered standard range during ww2, but cold war era guns fired at 20+km standard and much further with extended range rounds, not to mention that super advanced energy guns that break laws of physics are no diferent in effectivnes from autogun that is just XX century rifle. This don't take into consideration that guard possess no planes because it's domain of navy, regiment is either 100% tanks, 100% artillery or 100% infantry because of organisation based on paranoia "what if regiment go traitor", and even then navy aircraft are just dogfighting.
In short IG are outmanouvered, outranged, outgunned by any real(as in USA, China, Russia, India, Ukraine etc) army, and because GW is bad with numers guard will also have less troops than said armies. This is before we take into account tactical nuclear weapon.