A chewing/bubble gum is always a mess when it sticks to an object (shoe, cloth, etc)
My answer will add two ways after freezing and ice cubes:
Put the shoe in a plastic bag. Wrap the bag tightly against the shoe and close the bag well. Put the shoe into the freezer for about one hour. When you take the shoe out of the bag, you will see that the gum is stuck to the bag.
2. Ice cubes
Put the shoe in a plastic bag with ice cubes. Make sure the ice cubes only touch the soles or the heels, or you may damage the shoe. Press the bag so that the ice cubes press against the gum. Hold it there for a while, so the ice cubes freeze the gum. When the gum is frozen, remove it with a knife.
Spray the gum with WD-40 and wait one minute. The gum should come off with a paper towel
4. Peanut butter
Apply a thick layer of creamy peanut butter to the gum. Leave the peanut butter in place for about 10 minutes. Rub a wire brush over the area to remove the gum. The peanut butter will pull the gum off along with it. When it's gone, clean the sole of the shoe with water
I love peanut butter, and would consider last possible approach.
I have followed this reference
Stay gum-free, stay clean