At the beginning of Chapter 25 ofThe Catcher in the Rye, Holden says this might be the most depressed he's ever been in his whole life. His reaction to the "f you" written on the wall is typical Holden but also maybe a sign of maturity. He says he'd like to catch the kid in the act of writing it and he'd basically kill him. Then he admits that he wouldn't have the guts to do it. And despite his hate of authority figures (all adults are phonies), he fears getting caught when he rubs it out. So, consistent with a lot of his thoughts throughout the novel, he exaggerates his disgust of what other people do, but writing 'f you' on a bathroom wall is a sign of rebellion (albeit a pathetic one) and Holden's frustration with adults indicates that he believed himself to be a rebel. So, he's criticizing someone for something he might do himself.
The fact that he is so angered by this, I think, is because it is at Phoebe's school. Consider Holden's desire to be the "catcher in the rye" in Chapter 22, saying "that's the only thing I'd really like to be." He wants to avoid becoming a phony adult but he also dreams of protecting children (an adult role and therefore a kind of maturation) from the adult world. I think his anger with seeing what we might consider adult language defiling the innocence of Phoebe's elementary school stems from that dream of protecting children from the phony, vulgar adult world.