You need to get a license BEFORE you start working in any state, in general...there might be some exceptions such as getting a "short track" license or temporary one. My current state license it took me only a couple of months to get, and it wasn't that much trouble. As far as I know, California does not do temporary licenses and they definitely have to process to speed up the application, no matter how much the applicant might want that. They specifically warned us about that fact. I have a license in another state and currently am working on getting a California one. I've been working on it for 3 months, but currently still waiting...I have heard 4.5 months or so is average for getting one from there, so you really need to get on that at least 6 months prior, or more if you can, if you are thinking of moving there. It will cost you about $1200 all told to get a license in California. There is an applicant fee of about $400 and then a license fee of $830.
Some people say to never give up a license once you have it, but as mentioned above it can be expensive and time consuming to maintain all those. The CME in general is not a big deal...you can do it online, at professional meetings, etc. Mainly I would not want to pay to maintain multiple state medical licenses if I am not using them. Some states have a "retired" license process where I think you can retire it temporarily, and ask to get it back (and repay the yearly fee) if you want it back later.
OP, my advice is if you are thinking of staying in your current state where you are doing residency, then definitely go for that state license first. Also, need to discuss with your spouse where you two plan to live, and what are your future plans...I seriously think it's too expensive and too much trouble to take out 3 or 4 different state licenses at this point in your career.
Also, as mentioned by the attendings above, you'll have to get hospital privileges at any hospital you end up working in, and that can take a couple of months. I am filling out paperwork now for hospital privileges @ a California hospital and they basically want copies of all my credentials (med school and residency diplomas, ACLS card, driver's license, social security card, internal medicine board certification, personal references, the works...).