Passenger travel by rail is largely a relic to be enjoyed for the sake of history and sightseeing. It should not be subject to taxpayer underwriting. Heavy freight by rail is another matter, because there is no viable alternative in the near future for moving that amount of material that quickly, and it is often material from which the general public receives great benefit, transportation infrastructure notwithstanding.
Not that there is no room for improvement in rail freight. Would not be surprised if there are breakthroughs in the near future that allow for bigger loads with far less stress and friction on the rails. Transient micro-cogs for stops and starts, and a quantum magnetic function for coasting. The former may allow for locomotives that weigh half as much but have twice the pulling power. Both would alleviate wear and tear on rails and roadbed; in fact rails may soon become a thing of the past as well, but not major rights of way.
The future of transportation is in personalized, comfortable independent devices capable of safely navigating without human intervention other than programming some coordinates, with the ability to traverse land, sea, and air at speeds of up to Mach I, also capable of payloads of 10 passengers plus their baggage and beer.