By the time of Wagram, the Lines of Torres Vedras were already near completion. By the time Nappy arrives, Wellington and the Portuguese will retreat there. the fortifications were too powerful for any army to attack. Napoleon will face the same problem as that of Massena.
“Third Line, surrounding the
Fort of São Julião da Barra near Lisbon, was built to protect Wellington’s evacuation by sea from the fort”
https://en.m.wikipedia.org/wiki/Lines_of_Torres_Vedras
Which probably indicates that Wellington did not consider his defenses as
absolutely impregnable. It would be an issue of the dedication, skills and resources on attacking side. It is quite possible that the main problem for Napoleon in this scenario would be supplies: Massena retreated due to the shortage of food and fodder but he was notoriously bad in supply organization.
Then, it remains an open question in which shape and with how many troops Wellington would make it to Torres Vedras. Would he run immediately after Napoleon’s arrival, would he try to fight? etc.
A realistic option for Napoleon is not even try to attack the lines (why bother?) but to simply play Wellington’s own game on Wellington: Wellington implemented a scorched earth policy on the area near the lines and Napoleon could start methodically implementing it on a whole Portugal. The country is left undefended and “if your opponent occupied impregnable position, take care that he will remain in that position” (Terry Pritchett). If Wellington is bottled near Lisbon, let him stay there for as long as possible.
Wellington can keep sitting behind the lines being supplied by the sea but he can’t get too far out of them because by his and Nappy’s joined effort there is no food anywhere (which means that Spain is reasonably secure). I’m not sure for how long the Portuguese would keep welcoming their “defenders” in this scenario and what is the chance for the government of Portugal to start suing for peace before the whole country is absolutely ruined?