We've spent about 8 weeks total in Puglia in November or late March/early April. Everything I can think of is open except for the beaches, some boat rides, and the just-for-summer parts of beach towns. People do still sunbathe or go for walks on the beach on warmer days, so many beaches are not literally closed, just not in summer mode. Even churches are often closed all afternoon, so that's when you either explore a town (despite the shops and bakeries being closed), eat a long lunch, or drive from place to place. We've never had any trouble finding restaurants open, but be aware that they are not usually open before noon or after 3:00pm --- "lunchtime" doesn't just run into "dinnertime" the way it does in the many restaurants in the States.
Google Maps does a good job of predicting the time it takes to drive from one place in Puglia to another. But, just like at home, Google doesn't "know" things like how often you will need to stop, how long it will take you to park outside the ZTL, or whether you will get a little lost (perhaps because what looks like a road on the map looks like someone's very narrow and almost vertical driveway in real life). In Puglia, it won't really be the topography or the traffic that takes extra time.
You don't say what you are interested in doing in any of the towns you name, except lunch, so I can't advise on the towns you picked or how long each will take. But, generally speaking, a definite thumbs up for spending lots of time in Matera, Lecce, Ostuni, and Bari, whereas Alberobello and Polignano a Mare seemed more like two hour visits to us. The other four towns are towns we have been to, but I'd have to look them up to be able to comment on them --- perhaps that means they weren't quite as memorable? But really, every town we have been to in Puglia has been enjoyable and you can't go wrong.
Since you do mention lunch a few times, I'll add that we've stayed in Ostuni and Lecce for a week each and can say that in both we found the greatest number of fantastic places to eat for the shortest walking distance. If you stay right in old town Ostuni, you barely need to walk for 5 minutes.