Nope, no worries here for anything.
First, the post of an earring isn't long enough to poke the foot. Even if it was, there's nothing from an earring that would cause concern.
There are no STIs that would infect an ear, and even if a person had a blood-borne pathogen (HIV, any of the hepatitis viruses), it would have died long before it entered your child's shoe, and there wouldn't have been enough blood on it to transmit, if for some reason the ear was bleeding.
I know you have health anxiety, but there's nothing to worry about here.