The Spanish encomienda system as its foundation in using Native Americans for enforced labour whereas the Spanish caste system as it foundation on a population of various races.
Encomienda was a labour system in Spain that recompense Lords with a group of people as Labour.
The Spanish cast system had children from different races, they placed class and status at birth. Class and status was based on how Spanish one was.