As a retired CHP supervisor with 33 years on the Patrol I'll add my two cents worth.
1. Register out of state and a good friend/neighbor will snitch you off. We had snitches come into our offices all the time because somebody is/was avoiding taxes.
2. Every office has as least one officer dedicated at least part time to foreign registration investigations.
3. California registration and drivers license REQUIRED within ten days of gainful employment. There are a very few exceptions, the best known, active duty military who are not licensed in CA. Their d/l is valid, even if expired. Active duty military with a CA d/l must keep their d/l current.
Residency is a state of mind, but there are several obvious factors that will definitely influence the officer's decision to cite or not cite.
Registered to vote in CA
Kids in school in CA
Employed in CA
Resident fishing/hunting license in CA
The easiest, safest, least worrisome is register your vehicles where you consider home.
Not only is the CHP fully funded by vehicle registration fees, DMV is also and CALTRANS gets a bunch of money from registration fees.
The registration and drivers licensing laws are very complex and change all the time. The best, most accurate information is from the local DMV and state police. City and county police are usually NOT good sources for accurate registration and d/l information since their interests generally focus on crimes against people and property.