It squeaks because air going past the hole makes a vibration. Just like whistling. It refills because the rubber wants to resume it’s regular shape, which creates low pressure on the inside, so air rushes in.
If it’s what I’m thinking about, the balls squeak because there is a whistle or reed in the hole. When the air goes past in rapidly in one direction (i.e., blown outward by squeezing the ball), the reed vibrates, causing the squeak.
There’s enough space for the air to go back in the hole with the squeaker to refill the ball, but it’s moving too slowly and in the wrong direction to vibrate the reed.
The reed is usually made of plastic. You can see something like it in those little party favor horns they give out to kids.