Optimal Policy Design under Institutional Heterogeneity and Endogenous Compliance