Yes the experience gained in an auto-calc battle is spread amongst all troops invoved. The main way to gain experience is to actually kill the enemy, hence in manual battles missle troops and cavalry experience often rises a lot faster than melee infantry as they actually kill more enemy.
Some experience is gained by all troops by simply being in the battle but I believe it is only a small amount.