It is die Scheibe, der Käse, die Portion and der Salat. Why do they have different indefinite articles?
Ein Portion Salat is simply incorrect; as you point out, Portion is feminine so the indefinite article must be eine.
The genus of the second noun — cheese and salad in your examples — is irrelevant, by the way. In this construction, the first noun carrying an article describes the quantity of the second noun; the latter never carries an article. Since the article belongs to the first noun, all three grammatical genders can follow without the article changing:
Ich nehme eine Scheibe Brot (neuter), eine Scheibe Käse (masculine) und eine Scheibe Wurst (feminine).