As others have already answered, it should be no issue as long as you have a valid same-day boarding pass.
However, as someone who flies out of SAN, it probably won't be worth the trouble as there's no landside connection between the two terminals (other than walking outside along the sidewalk). While Google Maps seems to think that it'd be a 5-7 minute walk--depending on the entrance used for T2--you still have to go through security both ways. PreCheck will help somewhat if you have it, but depending on your connection you may not be able to fully use it when returning to T1 as TSA doesn't always keep PreCheck open.
In short, T1 can't be rebuilt soon enough.