Raw here is a Predicative Adjunct. It is an adjective and not an adverb because it is describing the noun phrase, garlic. Predicative Adjuncts are very often adjectives. They're almost never adverbs.
Verbs set up slots for different types of phrase. The number of slots depends on the individual verb. All verbs set up a slot for a Subject phrase.
The verb BELIEVE, for example, can also set up a slot for an Object and a Predicative Complement:
- We believed him innocent.
Here the Object is him and the Predicative Complement is the adjective phrase innocent. A Predicative Complement is just a Complement that describes the Subject or Object of a verb. In the clause above innocent describes the Object, him.
The Predicative Complement of the verb IMAGINE gives us a description of the Object . We call these Complements depictive. This contrasts with Predicative Complements that describe the Object after some kind of action or transformation. Consider the verb DRIVE:
Here the Predicative Complement crazy describes me after the transformation described by drives. We call Predicative Complements like crazy in this example resultative.
A Predicative Adjunct is similar to a Predicative Complement, only it doesn't fill any special slot set up by the verb. According to the Cambridge Grammar of the English Language (Huddleston & Pullum 2002), optional, depictive predicative phrases are usually Adjuncts, not Complements. They don't appear to be licenced by the verb and they seem to freely be able to describe either the Subject or the Object of the verb.
In the Original Poster's example Garlic can be eaten raw, the adjective raw is optional. We can say Garlic can be eaten without any substantial change to the meaning of the verb EAT. The predicative phrase raw is also depictive and not resultative - because the rawness isn't a result of the eating action. Lastly, if we transform the clause into an active voice clause, then we will see that an adjective in this position can seem to apply just as easily to the Subject or Object of a clause using the verb EAT:
- He ate the pizza naked.
- He ate the pizza raw.
This data seems to show that raw is a Predicative Adjunct.