However, building passenger transit in an urban area is a very different thing, even if a long underground tunnel is a challenge in itself.
Mining through solid rock is not really that expensive these days. But when building metropolitan transit, arranging traffic around of an existing population is not easy, and building transit stations is an expensive business.
Making a tunnel through solid, hard rock is in any case cheaper than making a tunnel through non-solid earth which needs to be supported for every inch all the time.
Regarding cost of mining solid rock: in fact, where I live, I think in the construction of underground train line, the actual cost of mining is pretty much offset by the price for sale of rock matter, which is then used for claiming land from sea to construct new housing. It is fairly silly over here because we have a low population and lots of land, but when the city claims new land, it can build there and sell it without purchasing it from existing owners, and all the increase in land value from zero (in fact no land at all) goes to the pockets of the city, and the pockets that the city chooses.