Weak-to-Strong Generalization under Distribution Shifts