Worth noting that many "rare earth metals", especially ones used in solar panels and wind turbines aren't particularly "rare" (they were rare when they were first discovered)- neodymium is close to copper and nickel in abundance. It's absolutely true that mining in general is an extremely destructive process, but extraction is necessary for fossil fuels as well (not to mention transport/transportation infrastructure of the fuels themselves). And these materials are also utilized in nearly every electronic product on the market from iphones, drill drivers and recharable batteries to missiles . Our primary problem is over-consumption - resource management, disposal and environmental impact simply have no tangible inherent value to the global capitalist economy that measures its success in terms of growth (and shareholders pockets). If we could fix the inputs to the system we could more intelligently manage what we have on earth.
Also re space- if things keep going as they are only the very wealthy are likely to escape this planet before the climate puts a huge percentage of the human population in crisis. Think of it as a billionaire rapture and not as an escape route.