I think everyone is right and it's probably the medications. But there's another possibility.
My mother in law does this, and has done it for as long as everyone can remember, right down to repeating the stories. And she repeats them exactly the same way every time. She's not interested in conversation, if you respond, she is quiet for about 10 words and then talks right over you, usually switching to another subject.
She's neurotic no doubt, but not mentally ill. The doctor suggested the reason for it (because it will drive you xxxxxxx crazy...particularly since she follows you from room to room to do it and will even stand outside the bathroom door and speak louder while you are in there) was if she was talking, she wasn't thinking, or at least not hearing herself think, and that compulsive talkers are often trying to drown out unpleasant thoughts (in my mother in law's case likely painful thoughts of inadequacy and unworthiness).
I'd guess the most likely explanation for your child would be the drugs, especially since he's changed medications, but an alternative theory that could explain other people might be to cover intrusive thoughts, hearing voices, or blocking unpleasant memories.
You have my sympathy and I hope it gets sorted out soon, it's a hard thing to live with.