But your comparison is flawed, because pierced ear holes, if not filled, will easily heal over time, while the circumcision is non-reversible (foreskin will never grow back).
The principle is the same. The hospital should not be doing so much as trimming a fingernail of any patient incapable of giving informed consent, in the absence of a true medical necessity.
In the case of the ear-piercings, it is likely that the local cultural landscape is such that if the procedure is not performed in a sterile and controlled environment, by professional medical personnel, at the hospital, it would be done by amateurs at home. The medical necessity there may be the significant probability of botched, infected piercings. As a public health strategy, it isn't bad. Do the piercings at the hospital for two generations, and then ramp up the out-of-pocket cost for it, while vilifying it with a PR campaign.
Babies should still not be having their ears pierced, though. That is certainly of lesser severity than cutting off and throwing away more significant bits of the baby, leaving a permanent, visible scar there, but it is on the same spectrum. You are performing unnecessary procedures on a patient that cannot give consent.
Do you have a child? Would you not trim their fingernails?
Obviously you would, because you consent on their behalf. Same deal with the piercing; the Hospital obviously doesn't do it without the parents' consent.