This is a really good question, especially since a substantial fraction of the cheap Chinese solar panels produced in the past decade are not even lasting long enough to fully pay for themselves. Lower-tier Chinese panels are now frequently seen to be delaminating after just 6 or 7 years. At that point, they begin leaching toxic heavy metals into the environment.
Recycling them makes no economic or energy sense, so most will wind up in landfills, poisoning the ground for centuries to come.