This is a problem caused by ISA brown chickens and always happens to them, I've had a few and they ALL have problems, this is the most common one.
ISA brown chickens are the least healthy kind of chicken available, it is most often found in factories as a cage bird and is not a real breed at all, it's a hybrid bird, that is, the mother and father are not ISA brown chickens.
At 6 months they start laying same as most chooks, except the shell is usually very hard. So hard that if it is fertilized the chick usually can't break the shell. BUT, and here is why ISA brown chickens are so common, they lay about one egg per day rather than the usual 5 or 6 per week that other breeds do. That slight edge is why factories love them. This superavian (superhero) power is shortlived. At two years old ISA brown chickens are already beginning to break down internally. Rather than living for 8 years or so like regular backyard and pet breeds, ISA brown chickens are already about to die. GRUESOMELY most of the time. eggs without shells is a good day. They often can't make the protiens to make feathers anymore and go bald. They get airway infections, well, actually, you can look up all the awful details yourself.
ISA brown chickens are past their lifespan at 2 years old and so factories LOVE to dump them on unsuspecting members of the public because they can make a better buck than putting them down would make. They are worthless as a human's meal at two years, they have no meat on them. A dog would be hard pressed to get a meal out of one, well maybe a handbag dog. maybe.
Don't worry about it first off, the egg eating seems to be more related to the fails in eggmaking than bad behavior. Make sure they have a cup of shellgrit, if they freerange then put it out somewhere in the yard or in a shed with an open door rather than in the coop where it gets dirty and spilled. They eat almost none. You won't see it go down. You can also use a blender on the eggshells in your kitchen, with plenty of rinsing them as you go, and feed that to them when it looks like coarse sand. When they have good food including kitchen scraps from you and neighbors plus grit, they won't go after the eggs. Buy plastic eggs from china for about $3-4 a dozen, they get bored trying to break them. Make long dark nestboxes they can't see in because they are reasonably dark (we see better than chooks). This all reduces the problem down to the minimum which is ISA brown chickens WILL always lay eggs without shells and eggs with cracked and broken shells as soon as you buy ISA brown chickens because they are in the process of a gruesome death in front of the kids thanks to factory farms, thank you very much. Get any other breed of chicken.
Presented with an egg that has no shell, any chicken will eat it for all the same reasons that we eat eggs. They are a good feed. ISA brown chickens will always eat their eggs because ISA brown chickens will always lay eggs without shells. Don't worry, take the preventative measures and like me and my mixed flock which still has I think 3 or 4 ISA brown chickens that are getting sicker, they'll live out what lives they have, lay what good eggs they can, and you'll still get the eggs from the rest of the flock and even from the Isas.