The duty to repair still applies
Yes. California's habitability protections generally apply to your home regardless of whether the unit was legally permitted. A landlord who rents an unpermitted unit still must keep it fit and safe to live in.
That means the implied warranty of habitability — covering things like working plumbing, heat, safe wiring, weather protection, and freedom from serious health hazards — applies to illegal units too. In fact, illegal units are more likely to have habitability problems, because they were often built or converted without meeting safety codes in the first place.
A landlord cannot rent you a converted garage or basement and then refuse to fix serious problems by claiming the unit "isn't really legal anyway." Collecting rent for a home comes with the duty to keep it habitable.
So if your unpermitted unit has serious problems — no heat, dangerous wiring, leaks, mold, pests — you generally have the same repair rights as any other tenant, and possibly more. If your landlord is ignoring habitability problems in an illegal unit, a free, confidential review can explain your options.
This is general information about California tenant rights, not legal advice. Every situation is different.