I don't necessary think that all speakers must be non-political. I just think that there needs to a distinct distance between the speaker and the school. That way it is not seen as the school endorsing a particular opinion.
I tend to think that the rules change with age. Few of us think that college students should be sheltered from differing political opinions. So why should a high-school senior? or even a freshmen?
For years the government came into schools and did the DARE program to try to prevent drug use. DARE is definitely political in nature as is the legal status of most drugs.
If you want the President to address school kids in a non-political manner there are still things he can address. For example, for 15 years there have been concerns about the lack of native US citizens graduating college in Science and Engineering. Obviously the President could present some vision for the future hoping to inspire kids to pursue careers in Science and Education. That's not entirely non-political but it is as close as you can get.