Exchange rate misalignment, capital flows, and optimal monetary policy trade-offs