Addressing Misspecification in Simulation-based Inference through Data-driven Calibration