Stable Prediction with Model Misspecification and Agnostic Distribution Shift