Yes, rare earth and carbon inputs to manufacturing are both issues — that's not exactly a big reveal, despite what some over-dramatic, self-described #TRUTH!!! bloggers might think (I mentioned the first earlier in this thread).
The only harmless way to reduce carbon is to travel less — the electric car isn't a magic panacaea that will let us keep doing the same thing as before with all upside and no downside. It's just a matter of weighing costs vs benefits of different means of propulsion for different applications, and increasingly, electric is coming out ahead of fossil fuels or biofuels for many (not all) uses.
About 15 (?) years ago, The Economist reported on research in this area. IIRC, factoring in the extra carbon inputs during manufacturing, it took 3 years of typical use for an electric car to break even with an ICE car for total carbon cost; after that, it turned into a net positive. And, of course, there are other issues like smog in cities like Delhi
and Beijing that are killing hundreds of thousands every year, so reducing that is an additional benefit if electric vehicles independent of carbon reduction.
In our case, we don't drive much (we live in a walkable urban neighbourhood with good pyblic transit) and Ottawa doesn't suffer from smog, so we figure it makes more sense to keep our 2013 Mazda 3 running for now, since the carbon costs from its production are long-ago amortised. But when it wears out, we'll reassess and see if electric will be a better choice for a new car (not perfect, just better).