If you want to be on the safe side, start your trip on UA from EWR, then you can transfer without changing terminals and the hassle of bags recheck and additional security clearance. A good agent at EWR can check your bags all the way to MRY, even on separate (UA) tickets.
Personally, I would say just go on about your trip without the worry about quarantine, especially since you would be on airport property the entire time at SFO. Having to leave one terminal and reclearing at a different terminal - purely academic.