It should have been approved by the school first, whether or not you are a registered voter is a condition of the validity of the petition. If you aren't and you signed, the petition is invalidated. Such a petition would be one that is submitted for a public electoral vote, not a school recommendation. You should ask the school about it, and identify which students were passing the petition around if it was in violation.
Ask. I do them often and they ask for personal information and there HAS been change from them.
It's safe
At my school I signed a petition in order to help in opening a health center. It asked for name address and birthdate. Now I'm a bit concerned if its safe or if its a scam. The guy also asked if I was registered to vote?