In the absence of vacuum, for example, if the train is filled with air, wouldn't the air be the one that's pushing the ball forward?
No. We can, and have, tested that objects will keep the same velocity if no outside forces act upon them. This is often referred to as Newtons First Law.
When the train has a vacuum inside and is moving at a constant velocity, everything inside the train should also be moving with that velocity. If the train does have a constant velocity, the back wall of the is basically just propping you up so you don't fall. Since you're already moving the same velocity as the train, you don't really need a force to push you forward, unless there is some other force pushing you backwards that you're trying to work against.
Also consider that the force of the air on the ball will be due to relative motion between the air and the ball (see drag force). This means that if the ball is moving the same speed as the air in the cabin, the air isn't applying any force to the ball, so replacing that air with a vacuum should have no effect on it's horizontal movement, and it should move horizontally the same in or outside of a vacuum.
Although no one has done your particular described experiment, other experiments would have shown consequences of this effect. It probably wouldn't be that hard to test. You would need a vacuum vessel of some sort (preferably clear so you can watch in real time), some way to launch the ball (like a spring mechanism you can control from outside the vessel), and a way to move the vessel at a constant speed. I am quite certain that it will do as Newtonian physics predicts though, or else we would have run into many other contradictions already.