In response to your question #2:
The safe harbor provides that an individual domiciled in California who is outside California under an employment-related contract for an uninterrupted period of at least 546 consecutive days will be considered a nonresident unless any of the following is met:
• The individual has intangible income exceeding $200,000 in any taxable year during which the
employment-related contract is in effect.
• The principal purpose of the absence from California is to avoid personal income tax.
If your move is intended to be permanent, and you abandon your domicile in CA and establish a new domicile in Spain, then those actions alone will result in your becoming a non-resident of CA for tax purposes. A non-resident of CA is subject to CA income tax only on CA-source income - one example of which is net rental income from a property located in CA.
All this is explained in detail in this California FTB Publication:
https://www.ftb.ca.gov/forms/2022/2022-1031-publication.pdf
**Answers are correct to the best of my ability but do not constitute tax or legal advice.