HOUSTON—Exxon Mobil Corp. and Shell Plc. on Thursday confirmed the sale of their California oil joint-venture Aera to German asset manager IKAV for $4 billion, ending a 25-year-long partnership that was one of the state’s largest oil producers. The sale reflects the two companies move out of mature energy properties at a time when high…