I agree with Leigh, the first expression is probably more common. However, both are grammatical and make sense. It depends .... whether or not you have a hole 'in' your shoe (you either need to get your shoes repaired or buy a new pair) or you have a hole 'under' your shoe, (you could be standing on a hole and, in which case, I hope it's not a manhole ;)