The shuttle drops you at the wrong end of town for Florence
The cruise-line shuttle runs to the centre of Livorno, which is fine for a day in town and unhelpful for a train: the usual drop is Piazza Grande, nowhere near Livorno Centrale station, so you would still need a bus or taxi on top.
Passengers going by train usually skip it. From the Molo Mediceo berths you can walk out of the port and catch city bus 1 up Via Grande to the station in about 15 minutes; from the outer Darsena Toscana berths a taxi is the realistic option, about a 10-minute ride to the station.
Florence on the regional train
Regional trains run from Livorno Centrale to Firenze Santa Maria Novella one to three times an hour and take roughly 70-100 minutes, depending on stops. That leaves about four to five hours in Florence on a typical call - enough for the Duomo, Piazza della Signoria and the Ponte Vecchio on foot, not enough to add the Uffizi or the Accademia without a pre-booked slot.
Pisa is the easier win: Livorno Centrale to Pisa Centrale is 20-25 minutes, with trains every 15-30 minutes, and Piazza dei Miracoli is about a 20-minute walk from the station, so a Pisa half-day leaves real slack before all-aboard.
Sources: reidsguides.com, italyplanner.com, tourismattractions.net