Between Barcelona and Alicante the two big tourist cities are Tarragona (Roman ruins) and Valencia. I haven't been to either one. If you're willing to divert from the direct route, I can highly recommend Teruel, an inland city chock full of Mudejar (Moorish-style) towers and some nice early 20th century architecture. It has a very different look from the other cities you're likely to visit on this trip, unless you route yourself from Malaga (not Alicante) to Porto. I approached Teruel on a bus from a different direction, so I can't comment on the road, but it appears that this detour would add at least two hours to your drive, not counting time to park the car and do some sighteeing. I'd figure 2 hours as the minimum look-around time, and a half-day or more would be great. Heck, spending the night would be a fine idea. Cuenca, with its hanging houses along a ravine (and a couple of good small modern art museums) is a fine destination, but it's farther inland than Teruel and would be a longer detour.
I wouldn't spend the time to go to the Balearics on such a short first trip to this area.
I suspect that driving from Spain into Portugal will prove to be expensive because of the drop charge for the rental car, but I offer the following comments just in case:
For the Alicante-Porto drive, Google Maps shows two possible routes. The northern option skirts Madrid and seems subject to more rush-hour traffic peaks, but it passes very near or through Avila and Salamanca. Even better, to my mind, is Segovia, which isn't much of a detour from the direct route. As far as Avila goes, I agree with the guidebooks that suggest just a brief stop there; you can walk along the wall, but there are other cities I found much more interesting.
The southern option avoids Madrid but goes very near the truly fabulous Toledo. Highest recommendation if you haven't seen that city already. You can easily spend more than a full day there. Other possible stops include Talavera de la Reina, a historically important pottery center with a 17th century palace, and the small town of Oropesa with an old castle converted into a parador. Plasencia is a larger city with a historic center of considerable size. Off the route to the south are two other fabulous destinations that I preferred to Plasencia: Trujillo and (my favorite) Caceres. Caceres is a UNESCO site with a stunning, nearly perfectly preserved walled historic district.
The two routes come together near the Portuguese border at Ciudad Rodrigo. CR gets some tour buses--I think mostly from Portugal, but it otherwise feels like the "back of beyond". It's an old walled town and great fun to explore.
Once you cross into Spain [oops--I meant Portugal, of course], the route takes you past two cities I enjoyed: Guarda and Viseu.
Truly, I think you'd do best by flying between Spain and Portugal. The drive is a bit of a slog, and though there are many interesting places along the way (see above), you have plenty to see along the Spanish and Portuguese coasts.