MUNICH — Bayern Munich produced a seven-goal Champions League quarterfinal classic Wednesday night, rallying late to defeat Real Madrid 4-3 at the Allianz Arena and advance 6-4 on aggregate, ending the 15-time European champions’ campaign in dramatic fashion.