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.
CJ