Coming from Zagreb--probably on train although we could rent a car--and have 3 nights before Istria--should we sleep all three nights in one of these places and visit the other or split where we will be staying.
Bled is a convenient base for exploring the area, but it's not a particularly charming town. More practical than charming. The nearby little town of Radovljica has a bit more charm.
But I really love Ljubljana, especially at night. It's a pretty town all lit up at night, plus there are lots of restaurant choices, etc. that you just won't find in Bled.
It may still make sense to spend a night in Bled but it's not required. It depends what else you plan to do. Explore nearby Lake Bohinj? Drive the Julian Alps loop? (I recommend the scenic mountain drive between Skofja Loka and Bled via the towns of Jamnik and Kropa vs. the fast freeway route via Kranj. Skofja Loka is a nice little town to explore as well.)
If you aren't driving from Zagreb, then what's the transportation plan between Ljubljana, Bled, and Rovinj? You can do it all by bus for sure, but I'd plan it out. Driving in both Croatia and Slovenia is pretty easy, though, and usually not expensive. Try to plan to drop the car in the same country you rent it - a car rented in Slovenia and returned in Croatia usually incurs a steep one-way drop fee. Either drive from Zagreb to Slovenia to Rovinj with one car or train to Ljubljana, rent a car for a day or two there, then drop the car there and take a bus on to Rovinj.
Bled actually has a very charming little corner of old buildings right below the castle. I stayed there for 4 nights in September. Highly recommend The Old Parish House. It's run by the church of St. Martin right next door. Simple accommodation in a very old building but incredibly clean with brand new everything - one of the most comfortable beds I've slept in on vacation. Nice breakfast, views over the lake (if you ask for it), with flower boxes in every window. Free parking in a lot only accessible to the inn and the church. Reasonable price and lovely people running it. Easy walk to everything! Bled and the surrounding area really deserves one day of your trip. Boat out to the island, climb (or drive) up to the castle, walk through Vintgar Gorge just outside of town, and walk around the lake on the pedestrian path.
I took the bus from Ljubljana to Rovinj in 2015.
I'd choose Ljubljana rather than Bled as my base unless you want mostly time out in nature and will have a car. Ljubljana is charming and has lots to do. Lake Bled is really pretty, but it is very small.
Ljubljana, for sure. Lake Bled is pretty and there are some interesting things to see and do there but Ljubljana offers so much more. I spent time in both places last August and Ljubljana the year before. Love the city! My recommendation? Sleep in Ljubljana and day trip to Bled.