If you want to avoid the holiday, visit Barcelona. There is almost nothing going on that week other than some extra masses at the churches. I'd expect Madrid to be closer to Barcelona than cities that have epic celebrations like Sevilla, Valladolid or Zaragosa.
If, however, you want a truly great experience. Get a room in Zaragosa for Holy Thursday (directly between Barcelona and Madrid by train) and see some of the roughly 26 processions that go all day and night. It's not at all touristy and a unique cultural experience. There are road closures around the processions; arriving by train you won't have an issue. Between processions, everyone - including people in the processions - ducks into corner bars for a beer or coffee. It might be crowded around the start and end points of the processions but not too much elsewhere.
We visited Pamplona during their Good Friday procession, right around sundown, outside of that marginally crowded hour - where the route was closed to traffic - nothing was closed.