https://en.wikipedia.org/wiki/Great_Northern_Railway_%28U.S....
The Great Northern was the only privately funded — and successfully built — transcontinental railroad in U.S. history. No federal land grants were used during its construction, unlike all other transcontinental railroads
And the Great Northern was quite successful throughout the booms and busts of the late 19th century, outlasted most of its 'competitors' that were propped up by the government, because they had a proven market.
Why would you assume a big problem? The funding just needs to be strictly derived from user fees. If truckers can't profitably transport goods when bearing the full cost of their activity, then what they were doing was an uneconomic waste of resources.
At the moment it's something like $2K USD per household that gets dumped into road infrastructure, from general tax revenue not user fees like the gas tax. This is ridiculous. Modern tech makes toll roads not a big problem anymore. Most roads should be separately incorporated toll roads. There shouldn't be a cent of general revenue public money going into the major roads.
Public funding for intercity passenger rail is equally ridiculous, at least in America. The financials simply don't work and almost any route you can name would inevitably be a boondoggle. Even the NE corridor is pretty dicey. Rail only works with greater urban density than currently exists in the USA. As it is there's no reason not to simply run buses rather than trains, or "light-rail".
http://davidstockmanscontracorner.com/amtrak-a-national-haza...