How many people are employed by the coal industry? Both in terms of power and mining?
No one is saying that areas that are focused on these things will not find other jobs. There are ways to move towards this, take coal mines, Andrew Forrest has already started on this in the US. He has acquired a coal mine in the US and will convert it into a green hydrogen manufacturing plant and he wants to use the coal mining staff to do so via retraining. This sort of stuff is entirely achievable.
On wind / solar, yes you are right that they do not provide constant power, but there are significant changes that will occur IMO over the next 50 years regarding power distribution. In Australia for example, the national grid will become way too expensive, you simply cannot pay for the upgrade of transmission lines to make this worthwhile. We will do it this time, as we do not have a way out of it, but IMO over the next 50 years we will move away from a nationalised grid structure and move towards more local grids, but also more production at the premises. Its why I believe rooftop solar to be the most important element of our power grid. Reduce the required consumption from the grid, and you need to generate less centralised power and you need to transmit less also. BTW, batteries are the way forward for "in dark consumption".
Just on what you will bring up next is "what about the GST earnt by the government on electricity supply". Well if people need to spend less on their electricity, then they will naturally create more disposable income, that will then be spent on other GSTable products. The GST will not drop, it will just be generated from a different source.