You can never predict the exact outcome of any battle, but there are factors that can push it one way or the other.
In a general sense, the ground forces have a distinct advantage
Foot archers can effectively use longer bows than horse archers giving them a draw length advantage: a factor that compounds with draw weight for total bow power. This means they will be able to shoot the horse archers before the horse archers can shoot the foot archers. If the horse archers dismount to meet them with long bows, their disadvantages in armor style will still be a big problem.
If by "chainmail and padded jackets" you mean riveted chainmail and gambison (the standard European varieties of these armors) your armor will stop most arrows fired even at short range. If the horse archers are using bodkin arrows, their attacks will be able to penetrate the armor, but only at very close ranges (a few dozen feet at most). In contrast, most styles of lamellar armor suffers from lucky arrows and spears slipping between the plates; so, the lancer armor will stop some arrows, but others will penetrate even at longer ranges. Lancer and horse archers also rarely armored their mounts meaning they could be killed at very long ranges by longbows. Just having your horse killed from under you is likely to cause injuries significant enough to take you out of the fight.
As for the lancer charges, you can expect Macedonian style pikes to slaughter them. A footman can wield a long pike more effectively than a horseman can; so, the lancers will hit pikes before the lances hit pikemen. This again is a game ender for the mounted army which is already lightly armored.
Cases where the cavalry army would gain have the advantage
CASE A: The mobility of cavalry is a great for skirmishing an enemy. If the cavalry army is led by a good general who knows not to attack the infantry directly, he may be able to use his mobility to deprive the infantry of valuable logistics and reinforcements by attacking supply lines. If the infantry army is far enough from friendly cities, they could be starved out without ever being engaged directly.
CASE B: Cavalry troops have at most points in history been better trained and disciplined than their infantry counterparts. Since pikemen were just drafted peasants in most situations, it was common for pikemen to break formation at the sight of a cavalry charge not even understanding that they had the tactical advantage. Especially in the medieval period, well trained knights would charge at pikemen despite the apparent disadvantage. If the pikemen did not break formation, the knights would turn away at the last moment, but if they did break, the knights would utterly slaughter them because the routing army can't run fast enough to get away from a cavalry charge.
CASE C: Cavalry can generally choose the battlefield they fight in, even if that means it is a bad battlefield for cavalry. Archers, horse archers, pikemen, and lancers are all really meant for open field tactics, but if the more mobile horse army decides not to engage the infantry in an open field, they can force the fight to happen in woodlands. In woodlands, pikes are completely useless. You can not form a phalanx or even bring your spears down and level. Shorter cavalry spears on the other hand may still be useful meaning then even being forced to fight dismounted, the lancers may have a slight advantage in sparse woods, or at least be a fair fight in thicker woods where all spears are useless, and the fighting all comes down to sword and shield combat. Woods would also favor the shorter cavalry bows since any archery you do would be done at fairly close range where a shorter bow is just as lethal but less likely to get snagged by your environment.
CASE D: If the lancers use kite shields or long shields as many forms of mounted cavalry throughout history have done, the cavalry can dismount and effectively function like legionary infantry. Legionaries have a distinct advantage over pikemen and archers in an open field because they can testudo to protect themselves from archers, and once they get into spear range, they can trap the pikes between their shield and safely guide them between their ranks allowing them to safely close into sword or short spear range.
Cases where the infantry army would do especially well
CASE A: Wet climates. Wet climates are terrible places for both horses and the composite short bows more typically used by horse archers than ground archers. Composite bows were made using hide glue, an organic adhesive that gets eaten by bacteria in places with higher humidity. While neither style of bow could fire when wet, mono-wood longbows can get wet, then work again after drying out whereas composite bows often would often fail from extended humidity even if they are currently dry. Horses also sink more in muddy terrain than humans; so, the mud would deprive them of their mobility advantage.
CASE B: They are fighting over a place. In warfare, holding certain ground is often an important part of the greater strategy toward victory. The infantry would do better both offensively (because the cavalry has to stay still to hold the ground) and defensively (because they have better range) than the cavalry army. This becomes even more true in a siege scenario because the cavalry need to feed both their troops and their horses.
CASE C: They are fighting in a corridor. Pike formations are at their strongest when they face a frontal assault along a flat battle line many rows thick. If the battle is fought in a corridor that you can fully span like a steep-walled mountain pass or city streets, then the pikemens' flanks are protected. This means they can layer their pikes thicker and force the lancers into a frontal assault.
CASE D: They are fighting on an uneven battlefield. Similar to horsemen in the woods, this is a case of not being the ideal place for either army, but being worse for the horsemen. Pikes formations can be a harder to maintain in uneven terrain, but humans are natural climbers. They are better designed for uneven terrain than horses; so, will be perform more on par and have more flexibility in where they can go on the battlefield giving them certain mobility advantages.