I had a duck that laid something like this just after she'd been eggbound. She'd sometimes pass little pieces of what looked like fried egg whites as well until she finally formed and laid normal eggs again. So my first guess would be some sort of egg/reproductive system error?
It happens. Likely it was just egg production gone wrong. Hopefully it will be out of whoever's system now and they can get back to laying eggies! Good luck!
I could be totally wrong, but I believe this is a "lash egg."
Google it and check out the images.
Lash eggs occur when a chicken has been ill and has gotten over it (I believe)... The "cooked" appearance IS cooked egg, usually the result of a fever. Fascinating stuff.
I had a hen do that one time. She was fine, and seemed as proud of it as if it were a real egg. It was a year or so ago. The hen died recently to the heat.