Please tell me what grammatical elements can come after a preposition?

1. The situation can be seen as bad.

2. ... between bad and good.

Normally, I think what comes after a preposition is a noun, pronoun or noun equivalent, but I also think an adjective can be used after some prepositions.
The only thing that can come after a preposition to form a prepositional phrase is a noun phrase, usually a noun accompanied by its preceding determiner and perhaps an adjective. A relative clause may be added. The noun itself may be a gerund.

If the element after the candidate for a preposition looks like it's not a noun, then either of these holds:

a. The preposition candidate is not a preposition, but perhaps an adverb or conjunction.
b. The structure after the preposition candidate actually is a noun phrase.

Both of your examples are in the category labeled b.

In your first example bad should be viewed as an adjective used as a noun, 'promoted' to a noun because of the elision of situation or its equivalent, one.

The situation can be seen as a bad situation.
The situation can be seen as a bad one.

In your second example, bad and good are simply abstract uncountable nouns meaning that which is bad and that which is good, respectively.

Yes, an adjective can come after a preposition.
Students: Are you brave enough to let our tutors analyse your pronunciation?
 CalifJim's reply was promoted to an answer.
Should one use the objective form of the word, such as "for he" or "for him"?t
Anonymous"for he" or "for him"
It's "for him". Personal pronouns after prepositions are always in the objective case.

[with, for, about, to, ...] [me, him, her, us, them, you]

Teachers: We supply a list of EFL job vacancies