Where society here and now should invest, what direction to go from from here, is totally up to us. What makes the most sense - preferably in the long run.
Cars are pretty shitty for long distances. Rubber tyres wear down the road and create unhealthy dust, way more friction and noise than metalwheel on rail. And they can be directly powered with electricity.
Not carry a heavy battery around and waste energy with charging and discharging.
Or well, have the noise and dirt of combustion engines.
Those are all pretty strong arguments to invest at least equally into a well functioning train network.
Every car that can be replaced with a train (in the simple often case of a person riding the train not moving his vehicel for himself) is a net profit for society. Cleaner air. Less or allmost no pollution.
(The electric trains here next to my home are really silent and still fast)
Personally I think this is having our priorities very wrong.
(I also think that rail as a primary mean of transport over roads is totally unrealistic and impractical, but that another issue)
If they plan a trip, the don't calculate the whole cost of ownershipt, they calculate the distance and how much fuel they need (a.k.a. flexible costs).
An extremely cheap ticket makes the car owners stop using their cars so much. This is not just a benefit for the abstact idea of "environment", but also a direct benefit for the population. Less cars means less noise pollution, less air pollution and more space on the roads. That way people, who actually need a car, van or truck to get around and do their work, benefit.