Hello and congrats on your upcoming 25th anniversary! May I ask when exactly in September you are planning this trip? The reason being that you may be in Barcelona for our annual city festival, La Mercè (Sep 21-24). The festival itself is huge, there are 100s of events spread throughout Barcelona's squares, streets, museums, and parks. The best part - all the entertainment is free! This is something that we put on for ourselves, not just for tourists. If you want to experience Catalan culture like a local, at least for a few days, this is a great opportunity.
I would recommend you shoot for at least a couple of days in Barcelona during the Mercè festivities. Here is the festival program: https://www.barcelona.cat/lamerce/en/programa-per-tematica
Now after those 4.5 days in Barcelona, hopefully in time for La Mercè, the question is where to go next for the next 4.5 days? Here are my two recommendations for a romantic getaway:
Menorca or Mallorca - you could spend some quality time in one of our Balearic Islands, late Sept/ early Oct should still be beach weather at the Balearics, though less tourists than in the high summer months. I know you mentioned Mallorca, which is the more popular one, but also strongly consider it's smaller cousin Menorca, just as or even more beautiful and definitely more relaxed then Mallorca. You can fly or even take a boat there from Barcelona. The capital of Menorca, Mahón, is delightful and has a long and interesting history, this is where mayonnaise was invented!
The Orange Blossom Coast - aka the Costa del Azahar this along with the Coasta Dorada, make up the stretch of coastline between Barcelona and Valencia. It's a land full of ancient olive trees, citrus groves, sandy beaches, lazy beach towns, time-warped castles, and Roman Ruins. A nice romantic roadtrip could be to rent a car and drive down from Barcelona to Valencia, stopping at places like Sitges, Tarragona, and Peñíscola. Here's an article from Rough Guides about this area: The Orange Blossom Coast: the Spanish Costa you’ve never heard of
P.S Personally I don't think Madrid in October is very romantic for a 25th anniversary, which is why I don't particularity recommend it for you guys. Hope this helps :)