Ajaccio you can definitely just enjoy close to the boat, it’s a lovely small city/town with nice shops to browse and lovely little cafes and restaurants. There’s several beaches within 10-15min walk from the main cruise terminal.
Civitavecchia is a good distance from Rome. On our recent cruise it was one of the only ports we did an organised excursion. We did one where you got taken on a coach to Civitavecchia train station then got on a train to San Pietro station in Rome where we had 6 hours of free time to do what we wanted. I’d recommend an excursion like that via train or coach if it’s an option and you’re someone who would feel anxious about getting back to the boat in time.
It is possible to get to Rome on your own, however. You can take a taxi from the port at Civitavecchia to the station and then take the Civitavecchia Expess, which is a train designed only for cruise passengers. You have to book this in advance, there is no way to buy tickets on this train on the day.
You can also take ‘normal’ regional trains into Rome, this costs about €5 per person each way. They take about an hour. I’m not sure how frequent they are through the day.
It is also possible to book on tours / shuttle coaches or taxis with independent companies. Have a Google and there are plenty.
Livorno, if you want to go to Florence you can do this by train. Again you can get a taxi (or a bus) from the cruise port to Livorno Centrale train station then get a train into Florence. The fastest trains take just over 1h10.
Livorno itself is a really lovely place to spend the day though! Depending on which cruise terminal you’re docked in, the cruise line might put a shuttle bus on into the centre of the town. Otherwise, there are local buses or taxis.
Livorno has some lovely food places and it’s just a nice place to walk around. The market is a great place to grab an interesting lunch. There are some lovely beaches to the north of the city. From Livorno itself there are boat trips you can do too.
Saint Raphaël is another lovely little town to spend a day in. There’s a pretty old town, lots of beaches including one right in the town centre, coastal walks, nice parks. There’s even a casino I think! Some of the beaches have watersports opportunities, we saw people kayaking from the beach we were on for example.
Barcelona, the cruise line will probably put on shuttle buses to the bottom of Las Ramblas (everyone we have done has I think). There are also shuttle buses run by the port which take you from the various docks to the World Trade Centre, where it’s about a 15 min walk to Las Ramblas. There are also always taxis as you get off the boat, you can often find people to share these with if you’re going to the centre which helps bring the price down.
It sounds a really lovely itinerary!
Also, remember you can always stock up on food on board, either having big breakfasts or on some of the ports (e.g. Ajaccio) you’re so close by you can nip back on for meals. This can help avoid spending lots of money on meals in port all the time. We sometimes do this and then just have a coffee / gelato / cake / some local speciality off boat rather than a whole meal.