Extracting the core question from Panicking: Used all my Schengen days and need to transit.
I looked at https://www.aeropuertomadrid-barajas.com/transportation/connections-between-terminals.htm and the people mover needs a boarding pass which makes me wonder whether it's air side.