Even if we do develop technology to mine asteroids (note that several of the companies that were attempting this in recent years have gone out of business or been acquired extremely cheaply) it's still a relatively short term solution. The asteroid belt only contains material equal to (roughly) 4% of the mass of the Moon.
That 4% mass of the Moon is spread out over mind boggling distances that doesn't even start untill roughly beyond the orbit of Mars. At those distances, PV power is going to be worthless, even at Mars the maximum solar irradiance is only about 59% of that on Earth so you're going to need to either build massive solar arrays and use wireless transmission to get the power down to the mining craft/drones (which will have to have considerable batteries in the event they get out of line of sight) or power them with some sort of nuclear solution.
Now, you'll be pulling a good deal of material off that you use purely for reaction mass. You'll also be pulling off a lot of stuff that won't really be worth sending back to Earth in any appreciable quantity like nickel and iron (although could be useful for construction in space and possibly worth sending to Mars) so when you do actually get to rare earths/precious metals you'll likely be able to mine more in a decade (if not a year) than earth has ever of say gold or platinum metal groups, but by even assuming you develop all the technology you need to do this, by the time you safely land it back on Earth it'll still be fantastically expensive to get to point of first delivery and a very very time consuming process purely due to the distances and practical limit on reaction mass for accelerating and decelerating.
Then you're still only talking 4% the mass of the Moon, if you were making a decent effort at mining the asteroids you might pull worthwhile material out for a century or two before you've exhausted the bulk of it and then it is "well, I hope we've developed FTL travel or generation ships!"