How was is it lassiez-faire capitalism for the government to give out such massive land grants and subsidies to private companies though? I'm not sure how complete the map above is, but that rail network is a total mess. What's even going on in Minnesota and Iowa? The density there is far greater than in the areas that had a high density of population and heavy industry, it's obvious the companies must have found some kind of loophole there where they were reaping windfall profits (or windfall land grants) by simply laying in track as densely as practical on the wide open plains to gain farmland and mining rights.
In addition to the blatant land grab in Minnesota and Iowa, going off of the map above it would seem that no one bothered to extend the railroads to export terminals on the East Coast, and the companies also failed to build railroads to Kentucky (a large state at the time), Delaware (a small state, but one inexpensive to please by building a relatively short rail junction), and South Dakota (a growing territory/state and one more populous than North Dakota).
That's fair, but it seems that there wasn't really any effort at ensuring the land grants and subsidies went towards constructing a rational railroad network. The density and branching nature of railroad growth in Minnesota and Iowa is evidence of that (especially with the lower density of rail in areas of actual population and industry, and lack of rail to many ports), and then there's the fact that many railroads actually did go and fail despite the massive land grants and subsides they were afforded due to overconstruction.
Could the state governments have stepped into the role? I'm not sure how expansive the railroad crisis was, but it seems an East Coast state could have purchased a defaulted railroad and built rail to one of its ports to help local industry, and the Midwestern states could have purchased the railroads for populism to help out farmers and then negotiated for export out of the state by bundling grain shipments as huge blocks.
North Dakota even went and built a state owned mill to give farmers more leverage in grain sales, and that was in the 1920s.
It wasn't lassiez-faire, but it was capitalism...what we today might call a "public/private partnership". It took land that was worth little to settlers because it was without access and provided the access that made it attractive and valuable. The remaining land held by the government was sometimes able to be priced high enough to recoup the loss of the granted lands. While the resultant network had a lot of redundancy (both then and later) from the standpoint of simple mechanical efficiency, it generally followed existing patterns of trade.
The reason for the extreme density of grants in Iowa & Minnesota have to do with the confluence of a few things: 1) The land is easy to build in, essentially flat. So, capital needed to build tracks is much lower than the hilly or mountainous lands to the west, 2) The land was available. Much of the eastern trunk lines were built up after the land was settled, or at least sold. 3) The land was intensively developed. Fertile and easily farmed, it could support a denser population than the more arid states to the west and south. 4) It also helped that lines in Iowa & Minnesota were on the way to somewhere else. Minneapolis/Saint Paul were the starting point for the transcontinental routes of the Great Northern and the Northern Pacific. Iowa, of course, lay between Chicago and the Union Pacific's bridgehead at Omaha.
Some of the eastern states, in fact,
did build railroads to their ports-well, from, actually. The Baltimore & Ohio was (with support from the state of Maryland) to provide interior access for the port of Baltimore. The Pennsylvania Railroad began as an inter-canal connector for the state of Pennsylvania's public canal/railroad project to connect Philadelphia to the west. Other states either had no need (New York), or already had access. The states you mentioned had their various discouragements to more construction: Kentucky was hilly/mountainous (so more expensive to build in and less densely populated), and did not lie on a natural route to anywhere (the most important line through the state-the Cincinnati Southern, which is still owned in part by the city of Cincinnati-could be easily bypassed
via either Louisville or Washington DC). Delaware is so small that almost any point reachable by railroad is going to already have water transport competition which is historically cheaper (and, in the case of agricultural shipments to nearby areas, just as fast or faster). South Dakota, while more populous, did not lie on a transcontinental route during the land grant era of construction.
The land grants were not (or almost never) granted all at once. While an initial grant might be made to start construction, additional grants were forthcoming only as construction advanced. Of course, construction could be delayed, which tied up the granted or alloted land from sale or development until construction began/resumed, or the land was taken and granted to another concern, instead. All this was because investment capital was scarce, and could dry up easily in a financial downturn, which would prevent farmers from selling their crops (no freight to ship), paying their debts (often to the railroad directly), and losing their farms (to bank mortgages). All of this leveraged capital would leverage back down just as fast and as hard (think of the housing bubble).
As for state/federal direct ownership?
Maybe for some specialized or lines of local importance/interest (see examples above) but not of any larger state system, and certainly not any national system. The suggestion of a planned national system built by private companies is even too restrictive without a POD that limits the rights and powers of corporations to an extent that would butterfly away economic history from at least the 1840's on. The only chances would have been after the network was built. The opportunities were: 1) WWI federalization-as pointed out in above posts, that wasn't gonna happen. The railroads were going back to their owners. 2) The ICC consolidation plan of 1929*, coupled with federal help to the railroads as the Great Depression deepened-unlikely in the extreme but perhaps the most plausible. 3) WWII-even if the system had broken down badly, I don't see a second federalization lasting much past VJ Day. 4) The 1980's-No Staggers Act, no deregulation, and maybe-just maybe-some or all of the railroads end up government wards. Possibly possible but no more.
*My personal favorite alternate history idea/speculation.