Minimax Optimal Estimation of Stability Under Distribution Shift