Hernandez completed his hat-trick before half-time before adding his fourth from the penalty spot on 66 minutes.
Luis Suarez also weighed in with a late double - which saw him past Diego Forlan as Uruguay's all-time leading goalscorer - to go with strikes from Diego Perez and Nicolas Lodeiro as Tahiti bowed out of the tournament having conceded 23 times in their three group games.
Uruguay's work was only soured by the 51st-minute dismissal of Andres Scotti, who will now miss the last-four clash with hosts Brazil in Belo Horizonte on Wednesday.
Tahiti also finished the game with 10 men after Teheivarii Ludivion was shown a second yellow card on the hour.
Spain had put 10 past the Oceania champions last time out and a similar scoreline immediately loomed likely when Hernandez headed in the opener at the back post from a second-minute corner.
The striker had to wait until the 24th minute for his second, when he beat the offside trap, before Perez made it 3-0 soon after when he tapped in after his initial header came back off the post.
Hernandez completed his hat-trick in first-half injury-time when picked his spot after being played in behind a static defence.
After the break, Scotti saw a penalty saved by Gilbert Meriel before he was harshly sent off for a foul on Steevy Chong Hue.
It mattered not as Ludivion also saw red and after Lodeiro and Hernandez added further damage, Suarez struck his double to move to 35 goals in his Uruguay career.