Arguably, future generations would find it easier to mine them from former landfill sites, where they would be present in concentrated form, than from some distant mine in the middle of nowhere.
As long as the "virgin" sources are super cheap its not worth it, but the market can change.
I mean as it is you can't even recycle most things if they are the least bit soiled since it is not economically viable to implement a cleaning process. We are doing a whole lot of assumptions that our future members of our species will have solved a way to reliably get pure rare earths from a mixed up slop of everything in a landfill. Whatever they possibly figure out is going to probably be far more challenging than ore refining processes we use today.
It might be cheaper/easier to try and capture an asteroid than to refine a landfill.
We’ll be out of many elements before we run out of rare earths. They are not actually that rare, they are mostly inconvenient to extract because they are distributed everywhere as minor elements rather than concentrated into ores. Things like cobalt, nickel, the platinum group metals, or even copper, are more worrying from a sustainable production point of view.
It's one reason the Chinese threats of cutting off rare earths is not quite as scary as the media makes it out to be. They can't do it for too long before alternatives get spun up and they lose their leverage entirely.