England bowling legend James Anderson has extended his cricket career by signing with Surrey for 2027 following his release by Lancashire.