The five great European philosophical languages are Classical Greek, Latin, French, German, and English.
Descartes wrote occasionally in French in the 17th century; and Rousseau always in French in the 18th. Bergson (of dubious reputation now) wrote in French in the 19th century. Mention must be made of Merleau-Ponty, Sartre, de Beauvoir. Althusser, Ricoeur, Badiou in the 20th century and on the side of postmodernism Lyotard, Foucault Derrida and others. Further French names could be mentioned but I think only Descartes is among the immortals.
German is THE European - or at least Continental - post-classical philosophical language. Where to begin, where to end ? Kant, Schelling, Fichte, Schopenhauer, Marx, Nietzsche, Frege, Husserl, Heidegger, Habermas. The list could be doubled or trebled.
English is an important language philosophically : Locke, Berkeley, Hume, John Stuart Mill, Russell ... I'm putting a word in for it even though it's not one of your options ;)-
Spanish is I think the language in which the least first-rate work has been done in philosophy compared with French and German. Unamuno (Sentimiento Trágico, 'The Tragic Sense of Life') and Ortega y Gasset are the only names that come immediately to mind. Spanish is notable, however, for philosophical novels - from Cervantes' 'Don Quixote' to the many, brilliant novels of Gabriel García Márquez.
From my background as a university teacher of philosophy I do not hesitate to recommend German. Other teachers of philosophy must speak for themselves. My opinion is fixed.