German adjectival nouns take exactly the same endings as adjectives would in the same grammatical context. Let us take for example one of the most common adjectival nouns to have been incorporated into the German language - "der Deutsche" (= the German man). It has an "-e" ending because it is:
masculine
singular
in the nominative case
in the weak declension (i.e. it follows the definite article "der")
Likewise the feminine equivalent "the German woman" is "die Deutsche", because this adjectival noun is feminine, singular, nominative and in the weak declension.
(It may help you at first to imagine the adjectival noun followed by "Mann" or "Frau". "Der Deutsche" has the same endings as "der deutsche Mann" and "die Deutsche" has the same endings as "die deutsche Frau".)
Notes
1. Adjectival nouns have the same endings as above after other determiners which require the weak declension such as "dieser", "jener", "welcher", "alle" and "sämtliche":
Mit welchem Deutschen redet er?
(To which German (man) is he speaking?)
Sämtliche Behinderten sind hier.
(All of the disabled people are here.)
Man muss allen Obdachlosen helfen.
(We must help all the homeless people.)
2. Note in the following examples how the endings of the determiner and the adjectival noun serve to distinguish between different genders and numbers of people:
Welche Verwandte besuchen Sie?
(Which (female) relative are you visiting?)
Welche Verwandten besuchen Sie?
(Which relatives are you visiting?)
Welchen Verwandten besuchen Sie?
(Which (male) relative are you visiting?)
Die Empfangsdame spricht mit dem Vorsitzenden.
(The receptionist is speaking to the chairman.)
Die Empfangsdame spricht mit der Vorsitzenden.
(The receptionist is speaking to the chairwoman.)
Die Empfangsdame spricht mit den Vorsitzenden.
(The receptionist is speaking to the chairpersons.)