Bonmati scored twice and got two assists in front of 43,217 at Auckland's Eden Park - a record for a football match in New Zealand - with Spain playing the Netherlands or South Africa in the last eight.
Bonmati's early opener in the last-16 tie was canceled out by a spectacular Laia Codina own goal, but Alba Redondo restored Spain's lead and Bonmati scored again to make it 3-1.
Codina then made up for her error by getting a fourth before the interval and Jennifer Hermoso made it 5-1 in the second half.
It was a defiant response to Spain's 4-0 defeat by Japan in their last group game and justified coach Vilda's decision to leave Alexia Putellas out of his starting line-up.
The reigning Ballon d'Or winner is still recovering her fitness following a serious knee injury and made just a cameo off the bench.
Instead it was her Barcelona teammate Bonmati who took center stage, and Vilda was asked if the 25-year-old might now be a candidate to win the next Ballon d'Or.
"I think I have the best 23 players in the world," he said.
"Aitana played very well today, she scored goals and was player of the match, but the rest of the team played very well too. We have 23 Ballons d'Or."
Vilda made five changes to Spain's line-up, including dropping goalkeeper Misa Rodriguez to make way in goal for Cata Coll, a back-up at her club Barcelona.
Codina also came into central defense for her first appearance at the World Cup.
Bonmati said the humbling by Japan had been on their minds.
"When you lose like we did the other day it is a really big blow but to win 5-1 in a World Cup knockout tie, be through to the quarter-finals and make history, that shows we are a team," said the midfielder.
"It was not easy after the other day but today we saw the character of the players and I hope we have a lot of days left here."
Spain were simply a class above a Swiss side who had reached the last 16 without conceding a goal but whose exit means they have still never won a major tournament knockout game.
"My players did nothing wrong. They have had a really good tournament. They gave everything and I am very proud of them," said their coach Inka Grings.
Farcical own goal
It took just five minutes for the opener to arrive, Bonmati slotting in after taking a lovely touch to set herself up.
That came after Redondo's effort from a Salma Paralluelo cross had been touched onto the post by goalkeeper Gaelle Thalmann, and Switzerland had conceded for the first time at this World Cup.
They were gifted an equalizer on 11 minutes as Codina, not far inside her own half, played a ball back towards her own box without looking up and beat Coll for a farcical own goal.
Spain soon restored their lead as Bonmati glanced on a cross by Ona Batlle and Redondo headed home.
Bonmati was running riot and was denied another by a good Thalmann save before she made it 3-1 in style in the 36th minute.
Redondo's header from Paralluelo's cross was blocked but the ball fell to Bonmati, who wrong-footed the Swiss defense with a turn reminiscent of Johan Cruyff before finishing.
Codina poked in another in a goalmouth scramble and it was 4-1 at half-time without Switzerland having an attempt.
The fifth arrived 20 minutes from time as Bonmati pounced on a slack pass out by Switzerland and played in Hermoso to score.