The helmet shell is made from plastic, whether it's fiberglass, lexan, or kevlar.
The solvent in the paint might attack the plastic, but given the fast drying times of the paint I doubt it would have any effect on the structural strength of the helmet. The affected layer would be pretty thin.
You can do far more damage by leaving the helmet out in the sun, exposing it to high heat or freezing temperatures, dropping it . . .
The aging of the shell, the lining and the strap is the reason for replacing your helmet on a regular basis.