Caste is inherited and runs in bloodlines. Why wouldn't it be considered racism?
“Race” is a fuzzy concept but generally distinguishes people of different ethnic origins. Indian castes aren’t different races—low caste and high caste Indians can come from the same ethnic group. It’s more like the European distinction between nobility and commoners. That’s also hereditary, but it doesn’t define different races.
But it certainly seems like caste would be a protected characteristic under California law--"Race, Color, National Origin, or Ancestry" are protected characteristics. Caste seems to obviously fall under ancestry.