A win for Sampaoli's side combined with the Netherlands getting something out of their clash against Australia and Spain's title defence will be over.
The reigning world and European champions were thrashed 5-1 by the Dutch in their Group B opener, but Sampaoli said there was never a good time to face Spain.
"No time is good to play against Spain, but since we have to, we try to make a good game, get them out of the cup, and that will be a plus for us," Sampaoli told a news conference.
"They play a final to stay alive in the World Cup, and we play a final to qualify."
Sampaoli said he believes Vicente del Bosque still has plenty of quality in his squad and Spain remain one of the favourites to win the tournament.
"The quality is intact. Spain remains a candidate to win the World Cup," he said.
"Beyond differences over time, Spain arrives with a group of players with more experience but who have suffered."