In the case of subsidizing clean energy I believe that most analysts have found that it results in a big net improvement in the long run.
Markets can get stuck in a local minimum where even though there is another local minimum that is lower than the current local minimum the market on its own won't move to that lower minimum because the cost to get out of the current local minimum is more than individual actors can afford.
Also in the case of clean energy there are benefits that aren't captured in the market price of clean energy or the price of fossil fuels, such as the effects of pollution. Pollution from fossil fuels leads to a lot of health costs in humans and also significantly reduces crop yields for example.
Look up interconnection fees for renewables for a look at the long run.
Renewables are also extremely polluting. Wind and solar as well as high upfront have relatively short lived and create a lot of physical pollution at the end of their useful lives (~20 years).
In contrast nuclear power plants may be pushed to 100+ years.
Markets can get stuck in a local minimum sure, but governments can get stuck there longer.
It's much much more complicated than this, nuclear power plants need significantly more maintenance, are much more complex to operate, and have somewhat unique failure risks and security concerns.
Solar vs wind vs nuclear is also a lose-lose sort of debate where you're ultimately disparaging a form of energy that is better than what most people are using today (coal and gas).
If we could get solar or nuclear or wind or just about anything ahead of coal and gas it would be a massive improvement.
Markets can get stuck in a local minimum where even though there is another local minimum that is lower than the current local minimum the market on its own won't move to that lower minimum because the cost to get out of the current local minimum is more than individual actors can afford.
Also in the case of clean energy there are benefits that aren't captured in the market price of clean energy or the price of fossil fuels, such as the effects of pollution. Pollution from fossil fuels leads to a lot of health costs in humans and also significantly reduces crop yields for example.