Very different advice based solely on my personal tastes and experiences. History is big on my list, especially pre-1500 history (preferably older).
Totally agree with flying into Madrid and home from Barcelona, or reverse (even if it means catching a Vueling, or similar, hop from Barcelona to Madrid to start the trip home). Madrid airport has a ton of walking so give yourself plenty of time to get around.
I don't agree with spending any significant time in Madrid. Madrid, IMO, is one of the worst places to visit in Europe. Why? It's very expensive by Spanish standards (only Barcelona is as expensive). It has high crime rates (again only comparable in Spain to Barcelona). Most importantly, to me, it has no history, no old center, no significant archaeology or architecture. It's also some of the coldest weather in Spain and might be quite cold when you arrive. IMO the best sight in Madrid is El Prado but that doesn't take three days to see. In fact, El Prado is walking distance from the train station where you would get off a train from Toledo and board a train to Barcelona. You could plan a morning or afternoon for the Prado and lunch. I also liked Temple Debod, a gift from Egypt. There are specialty museums to suit particular tastes but they aren't really world class places.
If it were me, I'd immediately take a train to Toledo and spend two nights there. Toledo is essentially the old center Madrid is missing. It was the capital of Spain until Phillip II moved the capital to Madrid in 1560. Madrid isn't any more historic than Baltimore. Toledo is an amazing medieval town as well as having less crime, lower costs and better food than Madrid.
If you want, rent a car and see Segovia. Segovia is nice because it has a castle, old center and aqueduct all within walking distance. A very short drive outside town is a Templar church from the 600's. If you want to go a little further, you could do a loop of Valladolid, Salamanca, Zamora and castles Penafiel, La Mota and Coca and get a flavor of Spain during the Reconquista days (this area was the heart of Castilian Spain).
Also on the train line to Barcelona is Zaragosa. The center is worth a look around and might be worth one or two hours getting off the train to add a stop on your trip without going too far out of the way. I had a great Semana Santa experience there (their processions are amazing) but Easter won't be until later in 2019.
You would probably need a car to see Pamplona. It's an okay city made famous by it's July San Fermin festival. Just south of Pamplona by car is Olite Castle. IMO it's one of the nicest castle visits in Europe. It's a good mix of restored and ruins. Restored enough to climb stairs and towers but not furnished and roped off. The audio guide that comes with the entry gives you an idea what it was like when the Kings of Navarre spent part of their year there (Navarre was part of Spain and France).
Barcelona is a completely different city. It's the capital of Catalon. People don't consider themselves Spanish (similar to the Basque on the north coast). I think a day of seeing Modernist sights and a day to explore the Barri Gothic are a pretty good use of time. I wouldn't expect beach weather but you might want to go north of town for a day to see the Costa Brava, Girona or Figueres. If so, look at Rick's guide for options to get there. I chose a day at Montserrat. It was okay but too cold to hike around.
I'm not a reservations person but it's not a bad idea. Parc Guell is open, no ticket or reservation needed. Sagrada Familia was packed even during the first week of April. You won't be there for Semana Santa, which is good. Barcelona does virtually nothing for Easter (unlike the rest of Spain).
I'm not big on modern history but I read Homage to Catalonia, by George Orwell, before my trip. It's an autobiography of his time in the Spanish Civil War and good reading to gain understanding of the time.