BING!
lawfag here
if there is no duly elected pres/vp then it falls to the speaker
however if there is not election there in speaker either
it then goes to the president of the senate who will be in office election or not
so there could be a situation where potus is not "elected" before 1/20 then his term expires
if CA does certify election of pelosi and she keeps majority then she is next in line