uc to cc to uc transfer

If you are pretty sure you want to leave UCSB, then see if it is possible withdraw, this might be the cleanest solution (although you won’t get credit for the classes you are passing)

If you don’t leave UCSB in good standing then they may not let you attend a different UC; it will be up to UCSB. You might want to make an appt now (since you are on-campus) with the admission office to find out what the rules will be. See https://admission.universityofcalifornia.edu/admission-requirements/transfer-requirements/preparing-to-transfer/other-types-of-transfers.html in the section “Former and current UC students”

As for repeating the classes at a CC