The problem with autonomous cars as compared to rail is that autonomy doesn't solve the other fundamental problem of cars: congestion. If I waved my magic wand and replaced every car in the bay area with a self-driving one overnight, roads would still clog at rush hour.
Additionally, an inherently safe trafic system doesn't require 2 tons of steel around you for protection. The car can be stripped down massively reducing road footprint and ecological impact. You will also hail the smallest (cheapest) vehicle that serves your purporse, a single commuter can comfortably travel in a bumpercar.
We have autonomous trains on controlled lines, and yet they can't run in close formation, and they still need parking space.
But whatever it is, you need something major to counter the increase in commuters or else the road system will get swamped.
Autonomous cars don't solve the problem of inefficient use of land for transportation (actually, they probably make it worse since there will be a decent fraction of cars moving absolutely no one). Space is at an absolute premium in cities, and people really underestimate just how much space cars take up, particularly since that space is incredibly subsidized.
A train is obviously more still more efficient between fixed points, but self-driving cars are far more economical for less-frequented routes and more convenient for last-mile transit than buses.
But a substantially improved autonomous car driving experience - with cars communicating with each other (actively or passively) to avoid congestion, avoiding parking needs by being on the move always and increasing "bandwidth" by driving close to there other cars and still being safe - may look like railroads on all our roads. Bringing both these worlds closer to each other.
There is nothing ordained about this. If we stopped giving away billions of dollars of the most valuable real estate in the world (in the form of parking mandates and street parking) or stopped ruining neighborhoods with freeways and car-centric development then rail (and transit more generally)_could very well be better by these metrics.
Even substantially expanded rail will never solve the problem of "I want to get from point A to point B, as quickly as possible, whenever I'm ready to leave" in a fundamentally different way. The transit to the starting station might be shorter, and the transit from the ending station will be shorter, but it's still the same experience.
Autonomous cars solve that in the same way an personal automobile currently does, albeit removing the inconvenience of actually driving.
The former is like-in-kind. The latter is fundamentally-different. Consequently, if I am a consumer, how much would I be willing to pay for the former vs the latter?
Cell phones became ubiquitous because they were a fundamentally-different communication experience ("Call a person instead of a location"). Transit will be the same way, if it changes.