Italy, which won its opening two matches 3-0, finished Group A with a perfect nine points while Wales came second with four points.
In the other group A game, Xherdan Shaqiri scored two goals to give Switzerland a 3-1 victory over Turkey. The victory might be enough to give the team a spot in the round of 16 as one the best third-place teams.
Chasing only its second European title, Italy will play the second-place team from Group C at Wembley Stadium in London next Sunday (likely Ukraine or Austria). Wales will play the second-place team from Group B in Amsterdam (likely Russia, Finland or Denmark).
The victory also marked Italy's 11th straight win and clean sheet.
The Azzurri first won 30 straight under coaching great Vittorio Pozzo from 1935-39 with a team that won its second consecutive World Cup.
It's been a remarkable turnaround for this Italy squad, which failed to qualify for the 2018 World Cup.
On a warm and humid evening at the Stadio Olimpico, Italy controlled from the start and Andrea Belotti and Federico Chiesa both came close to scoring before Pessina put the Azzurri ahead.
Verratti earned a foul that set up a free kick on the right flank and then whipped in a low cross that Pessina flicked into the far corner with his back to the goal.
Pessina, who plays his club ball for high-scoring Atalanta, was a late call up to Italy's squad following an injury to Stefano Sensi. He earned the spot by scoring his first two goals for the national team in a Euro 2020 warmup match against San Marino.
Minutes after his goal, Pessina had another chance but poked the ball just wide.
Wales' best chance of the half came with a header from Chris Gunter that narrowly missed the top corner.
Italy continued to pour forward after the break and Bernardeschi banged a free kick off the post.
By the final whistle, Italy had no starters from its opening two matches left on the field, with even goalkeeper Gianluigi Donnarumma replaced by Salvatore Sirigu in the closing minutes.