Choosing between Malaga and Granada - Malaga has more variety of sights, has a more attractive city centre, better food and is at the seaside. However, Granada has the Alhambra and Albaicin which are better than any of Malaga's individual attractions by far. So I'd pick Granada. Actually, I'd do both, but that might not be realistic for your available time.
Valencia is delightful. Some feel it is a more relaxing (less crowded) version of Barcelona. But it doesn't have Barcelona's top sights and, I think, is more a city to reserve for your second visit. It is also, as already mentioned, inconvenient to get to from Granada. But, it is more convenient from Sevilla, so if Valencia is a "must" perhaps reverse part of your trip to go Madrid - Granada -Sevilla - Valencia.
Personally, I think you're trying to cram too many cities into the time and not considering the journey times. Which is another reason to drop Valencia this holiday.
I'm not sure of your interests, but I'd suggest 3 nights in Madrid, with Toledo day-trip, then railway to Cordoba for 1 night, then railway to Sevilla for 4 night (with day-trip to Cadiz or Jerez or a hill town such as Carmona), followed by rail or coach to Granada for 2 nights and finally fly to Barcelona for 3 nights. Which is 13 nights, or two weeks.