If the school bans all politically based T-shirts, then it might have a chance of winning. However, the words "other inappropriate subject matter" suggest that some political views are considered appropriate. That would be "viewpoint discrimination" and so a violation of the First Amendment.
I’m for saying you do not have full 1st Amendment rights in elementary school. I don’t want my kids seeing uncouth t-shirts, so I am willing to have them put off wearing their own political messages.
The whole thing goes away if you bring back school uniforms. A lot of public schools around the world do that, and an increasing number of them in the US. The uniforms are more comfortable than they used to be, and they are not very expensive at Target. I’m sure kids would still try to wear provocative buttons or something, but that can be dealt with using a carefully written dress code.