I feel that most of the cost is for tunneling and the difficulties of working in such a space as a subway system. as for normal railroads, a quick googling shows that the cost is much more conservative, with a 1995 estimate[1] stating about $250,000 per mile to rehabilitate an existing railroad.
[1] http://tacnet.missouri.org/history/railroads/rrcosts.html