If that was a public school, that’s actually illegal. There’s a giant stack of court precedent about it, including at least one SCOTUS ruling – you cannot punish or treat a student differently for refusing to participate in compelled political speech, and the Pledge specifically has been tested in this regard and you can’t force that. Some parent (or recent graduate who has turned 18) needs to sue that school system ASAP.
That’s not what they said. Pressure isn’t the same as a requirement. The only (legally permitted) consequences for refusing to say the pledge are that some people might be mad at you.