Zaragoza is an interesting city, but be aware that it can be really hot in the summer. The smaller city of Tarazona (not far off the Zaragoza route) is also worth a stop, but I doubt that it's any cooler.
San Sebastian is a pretty place, and the beach is magnificent, but it doesn't have a lot of other sights. It appears that the big draw for many visitors is the pintxo bars, and I'm not sure that's the type of activity that will keep young children occupied for three full days. The pintxo area is very touristy, too. You cannot count on reliable beach weather in the Basque Country even in the summer; nearly everyone I saw in the water (June 2016) was wearing a wetsuit. I preferred Bilbao, but it doesn't have beaches.
I don't know the ages of your children, and in general I think large cities, like Barcelona, usually have more activities appealing to children, but Girona is a great day trip from Barcelona for adults. Girona has a walkable wall and a large medieval district. The small town of Besalu west of Girona has a fortified bridge. Taking the train would probably be easier than driving to Girona. Besalu is a bus ride from Girona.
The car is going to be of no use to you in Barcelona--and I think the parking charges will be substantial. If you re-configured your trip to run Basque Country - coast - Barcelona you could dump the car upon arrival in Barcelona and save on both rental fees and parking. If you're flying home from Barcelona, it would be prudent to spend your last night in Barcelona, anyway, and it's inefficient to check into hotels there twice.