The Poles, back in the competition after a 52-year absence, had defied expectations to reach the last eight in China.
They were behind from the third minute against the Olympic bronze medallists on Tuesday (September 10) in Shanghai, with the Phoenix Suns' Rubio making an electric start for Spain.
He had nine points in the first half and grabbed his 107th career World Cup assist to become the all-time leader, surpassing Pablo Prigioni of Argentina.
Rubio finished the match with 19 points, nine assists and five rebounds.
Juan Hernangomez of the Denver Nuggets surged to 14 points before the break as Spain, ranked two in the world behind reigning champions the United States, threatened to run riot.
But Poland, who as underdogs had the Shanghai crowd shouting for them, recovered to trail by only five points at half-time and stay in touch.
However, with veteran centre Marc Gasol peerless, the Spanish always looked in control against the team coached by American Mike Taylor.
The 34-year-old Gasol, who played a key role in the Toronto Raptors' historic run to the NBA crown, had 10 points and seven assists.
Earlier, strongly fancied Serbia were beaten 97-87 by Argentina to exit the tournament and leave Team USA as the favourites to retain their crown.