If you're staying in San Diego, you really ought to visit the model railroad museum in Balboa Park. They have a GINORMOUS Tehachapi layout, and other interesting smaller exhibits. Well worth an hour or two, even for non-train lovers (my wife enjoys going).
I visited Cajon Pass last year and while it's always a beautiful Southern California scenery, it can hit or miss, sometimes we'd see 10 trains in a row, then a couple hours with nothing. But that's railfanning for you. There's beautiful views to be seen for sure, and with 4 main lines (3 BNSF and 1 UP) the likelihood of trains just around the bend is high, you just may run into dry spells that could frustrate a spouse. You can find your way right next to the tracks, or have higher up vantage points for photos, depends on what you want. Note also that Palm Springs is about an hour and a half (each way) away from Cajon Pass, depending on traffic, so you may not have tons of time once you're there.