IMO a week on the Cape is not too long, especially if you add trips to the surrounding area (Boston, Plymouth, etc.) to your agenda. Arriving the weekend of July 4th, be prepared for LOTS of traffic and delays, especially at the bridges.
As far as Bar Harbor/Acadia, I think you'll want at least a few days. We could easily spend a week in the area, but we sailed up there for many years and would be exploring old haunts.
If it were me, I'd swing through the White Mountains on my way home - no sense in coming all this way and then not seeing something. livelylittlecampers have a great blog about a trip they recently took to Maine/New Hampshire and I'd recommend reading it (don't know the URL, sorry). IIRC they also had some campground recommendations.
Rob & Kelly, Bella & Brady (Miniature Schnauzers)
2016 Eagle 323LKTS
2016 Ram 2500 6.7L CTD
2015 White Hawk 29REKS Summit Edition (Traded)