This is were HDR is useful. It's the combination of under and overexposed images of the same subject. Without trying HDR, the next best option is to go full manual and try to hunt for the settings that produce the best compromise, but it will never be good.