The idea that AI is going to "solve" loneliness is so insane. Even the
framing of the idea is insane, in my opinion.
Loneliness is not really about having someone to exchange words with, fundamentally. It is about being validated by other human beings or entities. At a most fundamental level the AI doesn't have a choice except to appear to validate you and this lack of freedom, the fact that you do not win over the AI, means you can't actually get validation from it and without validation you will still be lonely. The notion that all these lonely people out there are so stupid that a robot nodding their head at them and saying "uh huh" is going to trick them into being less lonely ought to be profoundly insulting to everyone.
It is possible that AI might help people process their loneliness or plan their lives or whatever. Maybe one day AIs will be good therapists or not drive people to psychosis. All that seems plausible to me, but they can't meet people's social needs without the capacity to reject people, to form their own peculiar judgements, to be genuine entities whose esteem is actually valuable rather than just something they must appear to provide. AI may one day get there and be creatures who we might want to earn the esteem and approval of, but that doesn't seem to be something people actually want from them economically and it wouldn't solve loneliness anyway, since AI of this kind might well reject a basement dwelling, depressed, sad person just like a human might.