Anyway Onefourseventwofivenine having established my 'credentials' on the topic, here is my advice.
In your shoes I would look out for anxiety areas and address them if and when they come up. So start with t this one. One possibly good book is ...
What to Do When You Worry Too Much: A Kid's Guide to Overcoming Anxiety
I've not used that one but have used 'What to Do When Your Temper Flares', from same series, with my dd who has some autistic tendencies. My dd does struggle at school (she is dyslexic) but as pontificationcentral points out some children who have some additional needs may also be very bright at school, e.g. my adopted son is very bright at school but very emotional.
Please do not punish your dd for this, (for her) very upsetting night, by not allowing her to have her ears pierced.
Please do not encourage her to keep things from her dad. Or say things in a way that makes it sound like that.
Beware of hormones at 9, and as digitalpaintartist says "Have you considered why DD is so worked up about having her ears pierced?" Fitting in is very important for kids at school. Ask her about this, I am sure you have asked her, have you heard how she feels?
Please model for your dd how to decrease anxiety and deal with issues related to it. Whether this is a one-off or part of a pattern, please deal with this issue and do not get too 'het up' about the involvement of your ex or the ear piercing issue. Just deal with the anxiety and help your dd through it.
Your ex sounds kind of special himself, but not in a good way! Can you work together to decrease her anxiety. EH she desperately wants her ears pierced and thinks dad will disprove. Can you work together on this?
And changing one's mind is not always 'caving in' sometimes it is 'reevaluating' a decision, and this is valid too.
Good luck, I really mean that. Parenting is so hard and we need all the encouragements we can get so take this as the fact you've worked out she does have some anxieties but you can all move forward to address them. 