Resonant pairing isotope effect in polaronic systems