As far as I am aware, there is nothing rare about "rare earth metals". The only reason the west relies on places like China and Russia is because refining them is very very polluting, producing a lot of toxic by products. So we either do that locally and pay 100x more to fund the clean up after. Or we import from China and Russia where they apparently don't mind everyone getting poisoned.
So this isn't really anything to do with national security. It's a better moral outcome with some economic trade off...