How about a few days in Rome and then fly from Rome (Ciampino) to Barcelona (Girona) for the beach and fly back to Dublin from Barcelona (Girona)?
I visited both cities in one trip this way a few years ago, both are wonderful. You can get an apartment very close to the beach fairly reasonably in Barca, in the Barceloneta district (where there's a metro station, though it's not far to walk to Las Ramblas, El Born etc).