Governments are investing in solar because they want to be ahead in the renewable economy, where energy literally just falls from the sky. Is that a subsidy? I guess. It is also a good strategic move.
Are petrochemicals taxed or subsidized? I have no idea, it is a big tangled web. What are the costs of staying plausibly friendly with Saudi Arabia and other OPEC members, who pays that bill?
I’m not going to try and defend either way, but I don’t believe anybody who says they have an answer. If they did manage to analyze the entire global economy somehow (where to even start) I don’t think they’d post the answer here.
Otherwise, you can tax what you don't like to oblivion or subsidise what you do like until it appears viable, but in neither case are you getting a true picture of the cost. The subsidies/tax moves a simple cost question, into the murky world of politics and society and opinion.
We are only pretending to discuss costs if the social infrastructure is determining taxes/subsidies.