The only reason that renewables can't provide us with reliable power is because of our human political problems: we can't reliably cable up the always-sunny areas of the planet to the areas where people live, because the governments in the always-sunny areas are unstable.
This is where I got the 16bn figure: <https://www.investmentmonitor.ai/sectors/energy/uk-morocco-s...>. This source says £20 billion, but half is for the cable, and the other half the solar farm and other expenses: <https://sifted.eu/articles/xlinks-morocco-uk-electricity-cab...>.
Reporting is a bit inconsistent. My point is, transmitting electricity extremely long distances has its own downsides (construction costs & power losses), even if we assume Morocco gets a fair deal out of this.
And this project is "only" 7% of UK electricity supply. What of the rest? What of other countries? Saying "export" and "import" doesn't solve all the problems of intermittency (unfortunately).
The aggregate combination of the Sahara, the Gobi, and the Great Australian desert, Arizona, the Namib, the Atacama Desert.
> How much will it cost to build all this + transmission cables for all this power without big energy loss?
For a 1Ω resistance over the entire grid, assuming it was made of aluminium, 40,000 km long, material cost is about $239 billion.
(But on this scale the number is essentially imaginary, as the real answer is "how much do governments value the opportunity cost of the other things they could get people to do other than make a factory to make aluminium").