An AI boom is lifting technology-exporting economies. But rising energy costs and climate disasters are pushing many developing nations into debt distress. Greater digital connectivity would allow them to benefit from tech advances.