If you don’t want to recite the Pledge, then by all means don’t.
I think reciting the Pledge shows patriotism, not some slavish devotion to the state, but if you disagree, then don’t say it.
Problem solved . . .
People who do not wish to pray in school should just keep their mouths shut while the others that wish to do so, do so. If the words offend their ears in any case, they should ask to leave the room until the prayer is over. Same goes for the pledge. If the student does not return to class after the prayer and/or the pledge, they should be reported to the school principal for their absence.