The sort of thing that qualifies as "offensive" is culturally up for debate. There's no way to broadly classify what counts as offensive, and we will, inevitably, have to rely on the "I know it when I see it" rule.
That being said, I might be able to shed some light on why your question was viewed as offensive. It's not something I think is great to debate the veracity of on Puzzling Meta, and a lot of this is personal opinion speaking as someone with a long-term (if low-grade) mental illness. However, I think it's important to at least touch on.
Mental illnesses are a sensitive topic in modern society. There's an enormous amount of stigma associated with having one, and a large amount of fear surrounding it. Most people don't understand what they are or what the actual impact on someone's life is (and frankly, most people don't bother).
One of the central stereotypes that people with mental illnesses are fighting against is that they are somehow strongly connected with murders and violence, particularly school shootings. Many people feel that it's seriously harming the human support network people with mental illnesses need by driving away individuals who could help them, both structurally and socially. This is a broad, complicated issue, and this only scratches the surface.
When you write a puzzle that puts primary school murder suspects in a list with their mental illnesses, you've indirectly implied that the mental illnesses are causally related to those murders. It's a principle called Chekhov's gun - you wouldn't put it there if you didn't find it relevant. And that's a problem.
This isn't to say this is your fault, but in the future, please be careful about which ideas you're connecting and which types of people you're implicating.