I think it's entirely possible Harbaugh is gone in three years when his contract is up, regardless of what happens over the next two. The holdup right now is contract. Part of this IMO is that the Yorks aren't Paul Allen, who has f.u. money in the billions. It's not that they're cash poor -- far from it -- but just that the Yorks have family money, unlike Paul Allen who has his own McDuck tower (e.g. Allen's net worth is around 15 billion, Jed's is around 100 million) I'm guessing with the cash influx of the new stadium (projected to be +100 million per season) Jed will be resigning Harbaugh next off-season, a year before his deal is done. The York-Debartolo family isn't relying on the team for income (by a LOOOONG shot) but from John York's tenure I find it very doubtful that he would be opening up the purse strings and taking a loss every year.*
*John York is rightly blamed for the 49ers lost decade, as he was solely motivated in running the team as a business venture rather than a professional sports team. His first move after he took over ownership was to cut Christmas bonuses for secretaries and support staff, he just let Candlestick rot, the 9ers string of coaching ineptitude coincided with the 9ers rotating through signing some of the lowest paid coaches in the league, something that only changed right after Jed took over and signed Harbaugh.