Can a public university expel a student for singing an offensive song?
There are mountains of case law that show that the courts, the Supreme Court in particular, recognize that a public school can limit the rights of student speech whether on campus, off campus, online, or otherwise.
The most illustrative case is one styled (IIRC)
Tinker v. Des Moines Independent School District from 1969. What it says, basically, is that a school can punish for student speech if there is a possibility of a 'substantial disruption.'
Since 1969 courts have wrestled with the idea of 'substantial disruption' and have, at least in my humble view, continued to lower the bar to the point that the speech neither has to be substantial nor a disruption. Further cases have shown that the schools can use this standard to punish students who have spoken off campus, online, and even in their own diary.
This is an incredibly broad, complicated, and often nuanced area of jurisprudence. For anyone interested, I highly suggest the book "Let the Students Speak! A History of the Fight for Free Expression in American Schools" written by Vanderbilt trained law professor, and good friend of mine, Mr. David L. Hudson, Jr..
Ultimately your question is still open. Specifically, the question becomes do the courts use the same standards in public
university settings as they do for other public places of learning? I don't know.
If so, the student's likely have no recourse. In fact, the student's would have much less recourse than their professors who, if fired for the same speech, would have a viable lawsuit against the university for a deprivation of their first amendment rights.