Doesn't this stuff cost too much in terms of using rare Earth elements?
If this means these rare chemical elements, then no, it doesn't cost too much.
Turbine blades contain no rare Earth elements. What does contain is the magnets in the generator. Those can and will be recycled, unlike turbine blades for which recycling is hard. Actually rare earth elements are not necessary because induction generators can be used if we ever run out of rare earth elements.
Similarly, solar doesn't use rare earth elements at all so that's a non-issue.
For solar panels, the limiting factor is silver. Very little silver is used, so if you recycle used panels, you don't get much useful silver at all. Yet silver reserves are not huge, so every panel is gradually eating away our silver reserves.
The main component of solar panels is silicon. You could recycle it, but you get some impurities that are deposed on the panels during manufacturing stage. So for this reason, it probably makes sense to get our new silicon from as pure as possible silicon dioxide deposits.
You often hear it said that silicon is very common so solar panels can be made out of dirt. Actually this is not economically feasible. If we have orders of magnitude more silicon available than what we need, only the very purest deposits have significance, because the purer the deposit is, the less it needs to be purified after mining, so the cheaper it is.
If we ever run out of very pure silicon dioxide deposits (unlikely), we could use less pure deposits, and also recycle old solar panels.
Another significant component of both solar and wind power are the copper wirings. Those can and will be recycled.
Also remember the scale of the problem. A 1.5 megawatt wind turbine weights 164 tonnes. During its lifetime, it generates 100 000 megawatt hours of electricity. So waste is 164 tonnes per 100 000 megawatt hours or 1.64 kg / MWh.
Electricity generation from coal generates 1000 kg / MWh of carbon dioxide.
The wind power waste that is 1.64 kg / MWh is solid, so easy to store and contain. The coal power waste is 1000 kg / MWh and gaseous, so hard to store and contain.
A 1 kW solar panel weights 60 kg, and it creates 26 MWh of electricity during its lifetime. That's 2.3 kg / MWh waste, far less than coal power even though it's somewhat more than wind power. (Actually with solar, you need inverters too which creates slightly more electronic waste -- a 1 kW inverter weighs 10 kg, less than the panels though.)