So, we can look at the real world to see what goes into a tracks longevity. As expected, there is no easy answer.
According to this your standard gravel bed might last 15 years, despite the tracks in theory being in for up to 100 years. If you use concrete and steel elements the entire thing might last 30.
Of course, "last" is somewhat of a relative term. These figures, probably, assume for instance someone is there to remove plants.
This will not last 30 years.
And this is not really an issue you can just engineer away. Even if you elevate the entire track on a concrete wall, like this;
Dirt, Water and Seeds will get up there and will start to deteriorate the track. That being said, elevating the entire track will improve its longevity because it just takes longer for dirt and stuff to accumulate.
Note, that i have not even touched on using other metals. Because the actual physical rail isnt what is going to break first. Its the sleepers, ballasts and other parts which will fail first and make the entire track unusable. You can live with the rail warping a bit. You positively cannot live with the sleepers being eaten up by worms.
So, Imo, the main thing you would want to do is elevate the track a couple of meters perhaps with a base shape that prevents anything from growing up easily. You then want to make sure the top of your elevation structure is build so rain does not accumulate and can flush out dirt. Since you are already using approximately all the concrete in the world the sleepers are obviously out of it as well. And then make the rails stainless so they dont rust away.
Provided there is no earthquake or major change in the local geography that wall with a track on it should be usable for quiet a long time.