I believe Bari, Munich and Madrid are all in Schengen.
No passport control then. Nobody will care what your ticket says, just where you actually go to.
If you have a connection (and not a stopover) in MUC and luggage you need to make sure that your luggage is not checked thru to your final destination.
How do you plan to continue? If you have a connection to DC and miss your flight to DC you will loose your MUC-DC flight.