I don't understand claims like "AI will solve ___"
Loneliness can't be solved, it can be reduced but you'll never make it such that people just can't be lonely. Think about it, if you can live in a busy city surrounded by potential friends and still be lonely, why will it be different with AIs?
The same goes for cancer, energy, etc. Those are problems we can find ways to mitigate or make less scarce but we can't "solve" either.