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.
Contributing Member1,969
Yes, an adjective can come after a preposition.
Regular Member583
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.

Veteran Member68,037
Moderator: A super-user who takes care of the forums. You have the ability to message a moderator privately should you wish. These users have a range of elevated privileges including the deletion, editing and movement of posts when needed.Proficient Speaker: Users in this role are known to maintain an excellent grasp of the English language. You can only be promoted to this role by the Englishforums team.