You have nothing to worry about. Your driver's license is only "connected" to your vehicle registration insofar as it is a valid form of identification proving your address in order to register your vehicle in many states. It is mainly used by states as a way of verifying that you actually live in that state. They generally don't want to register vehicles to people who don't live there.
Side note: Not all states actually require a license to register a vehicle, but rather just proof of address. When you get a license, proof of address is a requirement in order to get the license, which transitively makes your license also proof of address since it was verified in order to obtain the license. There are some legitimate reasons why a person might register a vehicle without actually having a driver's license, and few states actively forbid the practice. The catch is that you'll have a much more difficult time getting an insurance company to issue you a policy when you're unlicensed in the state, and most states require auto insurance in order to register the vehicle.
At any point, you can surrender your driver's license and your vehicle registration will remain active until its own expiration date. You just won't be able to renew it without getting a new license. This is essentially what you're doing by getting a driver's license in Maryland - you are surrendering your California license to Maryland, and Maryland will notify California that you've done that so California can invalidate your license there.
So moving to a new state, your old vehicle registration continues to be valid from that state until its set date of expiration, regardless of what current license you have, until the state is notified otherwise. A police officer will think nothing of an out-of-state plate combined with an in-state license (or even vice versa), so long as both are currently valid.
What you need to worry about: Most states have their own laws that require you to re-register your vehicle under that state within a set amount of time after you've moved (usually between 30 and 90 days), regardless of how much time is left on your out-of-state vehicle registration. In Maryland, that grace period is 60 days. So don't worry about your California registration - just make sure you get your car registered with Maryland within 60 days of your move and you're set.
Once your vehicle is registered in Maryland, you'll always want to contact the DMV in California about the registration. Some states require you to submit a form by mail claiming that you've moved, and some even require you to surrender your old license plates. The DMV will tell you what, if anything, you need to do after-the-fact.