That's a great time of year for the Basque Country, and also for the Pyrenees, but I have no experience actually getting up into those mountains. I recall a few earlier posts indicating it can be done via bus, at least to some degree, but I'm sure a car would be very helpful.
For the Spanish Basque Country public transportation works well for getting to a lot of places, though the train link from Barcelona isn't especially fast. The train to Bilbao (8:45 AM departure) takes almost 7 hours. There's a 7-1/2 hour trip to San Sebastian/Donostia departing at 9:05 AM.
Return trips depart from S.S. at 7:10 AM (6-hour travel time) or 2:04 PM (7-1/2 hours) and from Bilbao at 3:20 PM (7 hours). The late departures aren't strange, given Spain's extremely late dinner hour. All those times are for weekday travel. Things could be different on Saturday or Sunday.
The trains from Barcelona to Bilbao make a number of stops in places you might like to see, so you could break the journey somewhere rather than sitting on the train for so long. For me, Zaragoza sounds like the most interesting option (it's the only one I've been to), but that city can be perishingly hot in the summer, which could be a concern. Maybe one of the other towns the train passes through would be more suitable, meteorologically.
En route to San Sebastian the train makes some of the same stops as the Bilbao train (including Zaragoza), then veers off onto another route. One of its stops in Vitoria-Gasteiz, the capital of the Basque Country. I liked it a lot, but it's inland and could be quite a bit warmer than the coastal cities (though one hopes not as hot as Zaragoza).
Traveling between Bilbao and San Sebastian is done best by bus. The train is scenic but much slower; it could be worth it in one direction. Other places of interest accessible by train or bus include Hondarribia, Zarautz/Getaria/Zumaia, Guernika, Lekeitio and Bermeo. I'm sure there are others. Some folks manage to include a visit to the French Basque Country. Bayonne (my favorite), St-Jean-de-Luz and Biarritz are easy enough (though not fast) by train and/or bus. I'm not sure about the small French mountain villages Rick writes about in his guide to Spain (no info in the guide to France).
Girona's very easy to reach from Barcelona by train. You have a choice of a faster, more expensive train or a slower, cheaper one. At a moderate pace you can see a lot in Girona in two days. Some travelers like to go on to Figueres to see the Dali Theatre-Museum there. Figueres also has service via both express trains and regular trains. Especially if you want to see both Girona and Figueres, it would make sense to spend a few nights in Girona rather than making multiple trips from Barcelona.
I'd just take the train to the Basque Country, but I really hate mid-trip flights. The Bilbao airport is larger than the San Sebastian airport and might offer more flight options.
In terms of the time you have available, including both Girona and the Basque Country would require you to move a bit faster than I did or see fewer towns, but I don't think it would be a foolish decision, and I am an unusually slow traveler, being retired.
Is this your first trip to Barcelona? Are you likely to make another one there in the relatively near future? Even if you needed no time to help your son get settled, I'd say arriving in the city on July 4 and departing on July 8 was the minimum time needed for a not-too-rushed visit. I think the first thing to do is decide how much time you want to spend in Barcelona. That will depend to a fair degree on how how tied up you are with your son on July 5-7 and how interested you are in the city's modernista architecture. Pinning down the time required for Barcelona will reveal how many days you have for other places. I assume you'll be flying home from Barcelona, so part of July 17 will be spent getting back to that city.