You don't have enough time for a good visit to all the Spanish places you mention, much less to Tangier (which is not a good choice in Morocco anyway). Let me show you the result of your tentative plan. I'm assuming you'll use trains because they're faster; it gets worse if you decide to drive. The only issue is figuring out what to do about scheduling the train departure on your arrival day--but let's worry about that later.
June 2: Fly into Madrid after an overnight (possibly sleepless) flight. Arrive jetlagged. Clear airport (could easily take more than an hour). Get to Atocha train station. Take train to Toledo, find hotel and check in (or drop bags if too early). You have a few hours to sightsee in Toledo (remember, you have to eat sometime), which could easily occupy you for 1-1/2 or 2 days, but you are jet-lagged and fuzzy-brained. You've been to England: Is it possible all you'll want to do is sleep? How energetic will you be the next morning? Is it likely you'll get a slow start?
June 3: Take train back to Madrid and then to Cordoba (yes, this is faster than driving). Train time alone is 3 hours. By the time you add in getting to Atocha Station in Madrid and from the Cordoba station to your hotel, you're probably at 4-1/2 hours if the hotel check-in goes efficiently. You'll be eating twice in Cordoba that day. How many hours will you have left to see this city that, again, could occupy you for 1-1/2 or 2 days easily?
June 4: Take train to Seville (2 nights): Door-to-door this is probably going to be over 2 hours, more like 2-1/2. Here you'll have under 2 days. It's better than the half-day in Toledo, but Seville is very large, with widely scattered sights. I think you need a minimum of 3 full days there.
June 6: Take train (or bus if departure times are more convenient, but it will take longer) to Granada. The train time will be about 4 hours door-to-door. I hope your hotel is efficient with the check-in or the baggage drop, because you have not much more than half a day to see the Alhambra, where it's possible to spend nearly an entire day. When are you going to eat? There will be no time to see anything else in Granada unless you take the 1:20 PM train to Madrid the next day--and how much can you accomplish in a couple hours in the morning; you'll have to cut your sightseeing short to go back to the hotel to pick up your luggage and then head to the train station.
June 7: Back to Madrid (2 nights). Figure about 5 hours door-to-door, longer if you don't take the 1:20 PM (fastest) train. That gives you about 1-1/2 days in Madrid, which (art museums aside) is the least interesting, least historic place on the itinerary. Given how short your other stops are and the fact that you mentioned history rather than art, I'd spend only the last night in Madrid and add the other night to Seville, Toledo or Granada. I'd rather spend that time in Cordoba than Madrid, too, but to me it's not as painfully pinched as the other three cities.
The above assumes you're departing from Spain on June 9.
In summary, seven days on the ground isn't enough time for 5 cities, or for 4 cities. I'd argue it's not enough time even for 3 cities, but not everyone would agree with me there.