I wouldn't go back to Madrid from Sevilla before going to Lisbon, I would just go on directly to Lisbon from Sevilla, as it will save you time.
I'd probably spend an extra day in Barcelona or Lisbon and one fewer day in Sevilla, unless you are trying to do a day trip to Cordoba or Granada from Sevilla.