The paint is on the backside of the glass, so I'm not sure how this would have happened.
If it's a 2011 or earlier iMac then replacing the glass is easy (and relatively cheap). If it's a 2012 or newer then the glass is actually laminated to the LCD panel so would cost much more, since you'd have to replace the combined unit.