Dubrovnik's airport is small (I have not actually been inside, but I had to pick up a rental car there once). Can't speak to the wait at immigration, but I assume otherwise it is easy to get around and connect. I assume you'll have to collect bags, then re-check them and go back through security etc. So, allow a few hours for that before flying on to Zagreb.
Adria Airlines used to have direct flights between Dubrovnik and Ljubljana - too bad they no longer do!
I would not recommend flying into Zagreb after flying into Dubrovnik from the US the same day and then renting a car and immediately driving to Ljubljana - you'll be wiped out from jet lag, won't you? I know I would be. Either spend the first night in Zagreb or don't rent the car until later. There is a well-regarded Slovenian transfer service called GoOpti that can pick you up at the airport in Zagreb and take you directly to Ljubljana. Even if you do it this way, it's going to be a long day.
You could also fly from Dubrovnik to Venice if that somehow works better or is a lot cheaper. Venice is slightly further from Ljubljana but not much - about a 3 hour GoOpti ride.
You don't want/need a car in Ljubljana proper, anyway. It's a lovely town with big pedestrian-only zones. However, you will want a car for a few days no doubt. You could rent one even for a day if you want to (long day trip to Lake Bled with scenic drives, etc.) You can rent cars from in town without going to an airport. Maybe rent the car as you leave Ljubljana after the first few nights. Last time I rented a car for a day from Avantcar in Ljubljana and dropped it after hours (left key at the hotel next door) and that worked out fine. If you want to stop for a night somewhere outside of Ljubljana instead, you could drop the car in say Koper (near Piran) on the coast and take a bus down to Rovinj or use GoOpti again - and rent another car there.
You could also return the car in Ljubljana and take the direct train to Rijeka (about 3 hrs) and rent the Croatian car there and drive right to Rovinj (I did this a few years ago). You can rent a car in Rovinj (if your best options turn out to be at Pula airport...keep looking, you can rent right in Rovinj), but there are more options for rentals in Rijeka. It's a little over an hour drive from Rijeka to Rovinj.
I'm not sure you need four nights in little Rovinj. It's a delightful seaside town, a great base to explore Istria, but the town itself is tiny. You can explore it in a few hours. But it's a nice town to come back to at night; it will be mobbed with tourists in July no doubt (I was there in May) during the day, maybe quieter at night. If you figure out what you want to see in Istria, then you can decide whether you need four nights there. You might get away with three.
Going south, there are other towns to stop at like Sibenik and Trogir (near Split). And there's another nice national park called Krka near Sibenik - unlike at Plitvice, you are allowed to swim there (below the falls). Maybe the kids would enjoy that.
Or add a night to Split and day trip to Hvar - a consolation for skipping it.
You don't necessarily need three nights in Dubrovnik at the end, either. Maybe if you arrive late the first day three nights would make sense because you leave the final day, but it's fairly small (bigger than Rovinj) and gets really mobbed with tourists during the daytime. I'd plan to get out of town at least one of the days you'll have there and come back at night to enjoy it when less crowded (try to stay in or near the old town - easier if you've dropped the car by then, because parking in Dubrovnik could be expensive in the summer if you stay near the old town).
If you keep the car past Split, you could detour to Bosnia and visit Mostar inland on the way south to Dubrovnik - something quite different than everything else on your itinerary.