You're young, so I understand your reaction. But I hope you weren't hoping for praise from us.
What you did was stupid, dangerous and foolhardy. I too have been the target of car-launched missiles. But you mananged to not only lower yourself to their level and then got even lower.
As another poster said, you were lucky that they weren't armed. And, had they just stopped, I'm sure you would have taken the bait and confronted them, only to get the snot beaten out of you.
I'm glad you are all right except for the egg stains on your uniform. However, keying their car and smashing the mirror after the fact could only be seen by a judge as vandalism. So had the fellows in the car had your name and address, they would successfully sue you for a paint job and mirror repair.
And since you ride that route frequently, you now have to deal with the fact that the next time they see you on the street, they could get rough.