Addressing misspecification in contextual optimization