I do not believe there is any shuttle from Half Moon Bay to UCSF. And I do not think ytou will find any public transportation that would be adequate. So I think your only option is to drive. Depending on what UCSF campus you are at your drive could be anywhere from 20 to 40 minutes.
Here is a response from Marian Bennett a colleague in Half Moon Bay at Coldwell Banker about her experiences driving from HMB to SF.
I live on the Coastside and commuted to SF's Financial District. I found it easiest to go north on Highway 1 (over Devil's Slide) to Daly City Bart and the train dropped me off within a block of my office. I did that commute only for a couple of years, so I didn't experience that commute during a slide closure. However, as an 18 year resident of the Half Moon Bay area, the slide has closed only twice. Yes, it's a pain when it does, but the short term inconvenience is minimal compared to the overall experience of coming home to an extraordinarily beautiful part of San Mateo County. When I drive to the City, it takes me 20-30 minutes depending on where I'm going. My husband did the Coastside to Silicon Valley commute for 17 years so we were heading in opposite directions. We wanted a great community to raise our kids that was a reasonable commute for both of us. If you are considering living in Half Moon Bay proper instead of one of the more northern communities (El Granada, Moss Beach or Montara) then Hwy 92 to 280 is your best bet. Highway 92 is currently being widened and that should help relieve some commute congestion. A link is provided here with project information.
Marian can be reached at: