Statistical Learning under Heterogeneous Distribution Shift