If going from London to Canterbury, most people would use the high speed (140mph) train service from London (St.Pancras). see www.nationalrail.co.uk.
You can easily go by train from Bath to Dawlish - but also consider nearby Teignmouth. In this area, Exeter is also worth a look but it is about a 17 minute walk to the centre form Exeter St.David’s station. Totnes is also worth a visit if in south Devon.
It is a bit difficult to get to Chepstow from Bath as it is not on the direct train line. You have to go to Severn Tunnel Junction or even Newport and then reverse direction on another train to get to Chepstow. (Chepstow has a medieval castle and a short ride by local bus will get you to the ruins of Tintern Abbey). However, if going to Chepstow, you can rule out the coast.
Cardiff has hourly direct trains from Bath and the journey takes an hour. You have 4 castles within 8 miles of central Cardiff:> Cardiff Castle, St. Fagans Castle & Museum, Castle Coch & Caerphilly Castle. The city centre has Victorian Arcades & modern malls whilst the Bay area (1 mile south - bus 6) is well worth a visit. The nearest place with a sandy beach is Barry Island - easily reach by frequent local train. However, it is rather tacky looking and the sea is murky due to silt in the estuary. I would consider going by local train to Llantwit Major (takes 40 minutes from Cardiff Central/Queen Street £5.90 return). Leave the station and ask the way to St.Illtyd’s Church - which contains some ancient stones. Then head off for the beach - which is about one and a half miles away - part of the walk is through meadows beside a stream. The beach rather rocky but you have a nice cliff top coastal path going west offering fine views across the Bristol Channel. http://www.visitthevale.com/en/Be-Inspired/Sea-Surf-Sand/Cwm-Colhuw-Llantwit-Major-Beach.aspx
It is also easy to go from Cardiff to Chepstow with regular trains.
This company run mini bus day tours from Cardiff. I see that on certain days they go to the Gower peninsula - which is west of Swansea. The coastal scenery on the Gower is fantastic. (It takes rather too long by public transport from Cardiff).
Google the places mentioned for more info.
Don’t forget to pre-book about 11 weeks out longer distance (over 1 hour) rail travel in order to get lower prices on specific trains.