The small amount of paint in the photo looks like nearly every old outlet I've seen, I'll agree with ThreePhaseEel that it's harmless.
But, one function of an electrical box is to contain any overheating or sparks & prevent fires. It's possible that a thick layer of outstandingly flammable paint all over the inside of the box (wires, outlet / switch, and the box itself) would be a fire hazard.
If you're worried, you could scrape or peel off the paint, or use a paint remover liquid - all very carefully, turn off the power first!
This is a nuisance caused by sloppy drywalling and painting, and is utterly harmless.
The Wires are insulated. The paint is only on the insulation - it is harmless. Even if the paint were on the copper wire it would be harmless unless it interfered with the connection.
Now the concern is when people paint the outlets - I personally hate it - it is called super sloppy painting. It can possibly conduct (when it is wet) and cause a short - but after it is dry , generally it will not cause a problem - I will not say never because I am sure it depends on what kind of (special) paint is used.