The most effective preventative measure is universal early childhood education. We spend more on prisons than we do on education.
I don't think education should be taxpayer funded. It should be parent funded. I can see where you're coming from tho. Stop the problem becoming a problem. But I wouldn't say poor educational engagement due to underfunding is the causative factor for mass shooters. Cho still has the high score, afaik. He was deep into education. As for inner city violence, it has more to do with large amounts of money from black market trade and honor culture feuds.
Imo, legalizing all drugs removes the criminal profit motive and stops putting people in prison who haven't done anything besides use drugs. The War On Drugs is a war on people who haven't hurt anyone and a police state boondoggle. To this day, 40 years after Nancy Reagan, the Right Wing will still whine about government overreach while simultaneously wanting peopletaken to jail for having a bag of powder in their pocket. The miracle of marketing. Yeah, there would be a bloodbath of drug suicides but if you want to kill yourself in that way then you should be free to do so. And we already have that anyway. Private charities and businesses that want to help with addiction can operate but zero taxpayer dollars for people who chose their path.
Anyway, because highly educated people commit less crime it doesn't follow that funding schools reduces crime. It seems more likely to me that people who pursue education are already less prone to criminality. It wasn't the education which purged them of their criminal inclinations. Besides, every time a bottomless well of tax money can be drawn upon, costs rise and efficiency drops.
The actual solution is to let taxpayers decide what they, individually, would like to fund. Then you can fund the school and I don't, and everyone gets to support what they believe in.