It’s all relative to what you’re after, both have their pros and cons, Midsomer is closer to Bath and Bristol and easier to get to the M4 corridor, Shepton is closer to the likes of Wells, Street and Glastonbury, plus easier to get south to Devon/Cornwall. They are both probably as bad to get to the M5/M4 to be fair, that area below Bath/Bristol is just a nightmare for commuting and getting through at times, it’s why i moved north of the M4 after a decade being south of it.
It’s probably down to just viewing the areas and picking the schools and so on that suit you best, they’re pretty close to each other, and getting to the Mendips, Frome, etc is pretty relative, for mountain biking you’re kind of having to travel a little to get anywhere though, road riding, there’s loads of lanes and routes around both to work out, and of course avoid the A roads either side, which are both horrible!