Retiring MotoGP champion Marc Marquez finishes second behind fellow Spaniard Raul Fernandez in the season-ending Valencia Grand Prix.