To me, the obvious reason why solar would be a gamble is that I have no guarantee I’ll be living here in the same home five years - let alone twenty - from now and I can’t take it with me when/if I move.
If you don't think you will be living there in 5 years, you probably shouldn't have bought the place, as the up to 10% or more transaction costs will eat you alive.
In five more years, not "for five years."
As a buyer I would value an existing solar/battery system, especially one with actual generation data, thus would pay more