Both the Amalfi Coast and Puglia are very far to travel from Cortona for just 3 days. Each is worth more time than three days at the location, and you must account for lengthy travel time in both directions (see below). July is not a good time of year to visit either one. For me, the likely miserably hot weather would be a bigger issue than crowds in Rome or Venice.
ViaMichelin's estimated driving time (no stops, no traffic, no getting lost, etc.) between Cortona and Bari (and you'd probably be going farther into Puglia than that) is 6 hr. 41 min. So realistically, nearly a full day of your 3 days would be spent just getting there. There's one train routing that is scheduled to take 6 hr. 35 min.; the others take substantially longer. Then on the third day you'd have to head back to the airport (I assume Rome), and that is estimated to take 6 hr. 13 min. by car (4 hr. 30 min. by train at the fastest). Again, that's from Bari but you'd probably be starting from a point farther south. So your 3 days in Puglia would really be 2 days.
Driving time to Amalfi is estimated at 5 hr. 20 min., but no one seems to recommend driving on the Amalfi Coast. The fastest train routing to Salerno is 4 hr. 55 min., then you'd need to travel on to your destination on the coast by bus, taxi, etc. Driving time from Amalfi back to Fiumicino Airport is estimated at 4 hours. There are a couple of train options that take less than 2 hours from Salermo to the airport; you'd need to add the time necessary to get to Salerno. If I were going to the Amalfi Coast, I'd want enough time to see several places, go to Capri (which is a full-day trip), etc. Two days and some odd hours would be really short, and you'd be fighting heavy traffic (whether in your car or on a bus), which would slow you down.