The victory for liberals comes after moderate candidates and causes had prevailed in previous California races, even in other deep-blue districts.