To function as described, it must be understood to have a fixed reference frame. Otherwise it would be a Rod of Relative Motion: just set it in motion and activate it to keep it going as if on invisible rails. Clearly that can't be sensibly gained from the normative description of its function, so it must have a fixed reference frame.
To function as described, it must be the plane or planet, depending on cosmology. If the plane contains planets, it must not be the plane (or it would be an "Possible Instant Death by Rod Impaction Rod" as the Rod and planet suddenly diverge at extreme speed), so a planets-based cosmology must use the planet as its reference frame.
(Yes, a rotating reference frame causes some conceptual issues. Don't worry about it—it's magic. Just so long as we interpret it so that it normatively does what the book says it does, the exact process by which it pulls that off is immaterial.)
In a plane-based cosmology without orbiting planets, it's pretty simple to conclude that, to work as described, its reference frame must be the plane itself.
Whether planes or planets, the result in the same: the Rod's Immovability is effectively relative to the ground.
What this means for vehicles
Vehicles aren't special objects that create a special frame of reference more important than any other. We think of them as so, but only because that's conceptually easier than thinking about how fast we're going in delicate coordination with all this other stuff nearby that helped accelerate us so much.
In other words, the difference between a Rod on a train and a Rod in your hand as you're walking is nothing except degree of speed and enclosed-ness, and the Rod cares about neither of those things, if we take its description at face value.
So what happens when you activate it on a train is the same as what happens when you activate it while strolling along: it stops, and obstructs anything and everything that isn't also stopping with it, possibly causing damage.
How much damage? Well, that depends on the DM, so I won't speculate. But I will point out that the Rod is only mostly Immovable:
More [that 8,000 pounds of] weight causes the rod to deactivate and fall.
So if 8,000 pounds equivalent force press on the Rod, it concedes. I think a train, sturdily-built, would count as at least that much. A door would likely break first, but at some point the Rod will probably catch up on some sturdy part of the train that could transfer that much weight from the train's momentum before breaking, and deactivate the Rod. (Needless to say, the attempt to bar the door with the Rod would not succeed.)
The Rod can also be moved slowly on purpose, by a strong creature:
A creature can use an action to make a DC 30 Strength check, moving the fixed rod up to 10 feet on a success.
That sounds like less that 8,000 lbs of force? So a lot of weight just hanging off the rod won't make it move an inch, but less force with deliberate intent to move it will nudge it? I don't know, it's a weird item. But the point is! A DM could rule that a slow-moving (like, 10ft./6s) train could "make a Strength check" and if it succeeds, then the Rod stays on the doors without reducing them to splinters.
I don't know, it's a weird item, but a DM could extrapolate that ruling if they wanted to.
But most likely, an Immovable Rod on a train will just blow things apart and be generally chaos and bad.