Better to incorporate in IL or CA?
It's very common for a business to have owners that live in different states, or even different countries. Choosing the location of the business registration depends on the type of business you would be conducting.
For example, if you are operating/conducting your business in both states California and Illinois, even if all the partners were working from home using their home addresses, this would create nexus in both states. So what you could do is form the company in one state, for example California, and then file the business as a foreign entity into another state, such as Illinois, plus whichever other states the business would be physically conducted in, or have nexus such as an office, property or employees.
I would recommend you to read more about nexus here: S-corporation in different state than I now live.