You have a problem with your exH.
The problem is that he apparently takes very little interest in his own child's whereabouts, safety, and welfare.
Or the problem is that he is lying to you on this occasion about the amount of knowledge he had before this was done.
You also have a problem with the GF, but it's up to your exH to stop being a lazy arse and letting her take over. It's not ok to not know where she is or what she's doing or eating, etc on days she's with him. That is negligence.
Above all though, the comments on keeping secrets are spot on, and this is the biggest issue. The hands off approach of exH is enabling this.
You need to find out in a discreet way what other little adventures DD may have been on with the GF, who she may have been associating with, where she may have been. You need to make absolutely sure that DD doesn't get any hint that you are angry with anyone when you're chatting casually about where, who, what, etc.
Be super casual about the earrings. Ask DD if she wanted them, and if yes, assure her you'll help her with cleaning and keeping her ears healthy. If no, have a heart to heart with lots of listening on your part. Gently ask if she feels comfortable enough to say no to GF, or if this feels uncomfortable to her. Ask if there has been anything else she felt she couldn't say no to. Don't preach. Listen, listen, listen. Nod, hug.
Investigate the shop where the ears were pierced. Demand to see the consent form. Report the shop to your local authority licensing department or public health department if they accepted the GF's word wrt being DD's parent.