For a 9 speed shimano chain, must I use a shimano 9 speed connecting pin?
What's going to different is the length of the pin. The outside width dimension of higher speed chains get progressively narrower, so the corresponding connector pin would also have to be shorter.

You definitely would not want to use an 11 speed pin on a 9 speed chain as it would not be long enough and the chain would be weakened. A 9 speed pin on an 11 speed chain may protrude too far and catch on adjacent sprockets or even the derailleur cage.

Given that pins are cheap and readily available I would just always use the correct type.