A number of style guides (including The Chicago Manual of Style, sixteenth edition  at 6.80) recommend using an en dash (–) to connect a prefix to a multiple-word proper name (as in "the post–World War II years"). And Chicago (2010) also offers an instance of the reverse case involving using an en dash to connect a suffix to a multiple-word proper name: "Chuck Berry–style lyrics." This suggests that Chicago endorses the en-dash connection for a compound adjective consisting entirely of a proper name and a suffix. For example:
a Rowley, Powley, Gammon & Spinach–esque law firm
But "David and Goliath" isn't a three-word proper name; it's two proper names connected with a conjunction. Chicago doesn't reject such compounds when they involve lowercase rather than initial-capped words, but it recognizes the difficulty that lowercase combinations (such as country music–influenced lyrics) pose:
6.80 En dashes with compound adjectives. The en dash can be used in place of a hyphen in a compound adjective when one of its elements consists of an open compound or when both elements consist of hyphenated compounds[.] This editorial nicety may go unnoticed by the majority of readers; nonetheless, it is intended to signal a more comprehensive link than a hyphen would. It should be used sparingly and only when a more elegant solution is unavailable. As the first two examples [involving post–World War II" and "Chuck Berry–style"] illustrate, the distinction is most helpful with proper compounds, whose limits are established within the larger context by capitalization. The relationship in the third example ["country music–influenced"] though clear enough, depends to some small degree on an en dash that many readers will perceive as a hyphen connecting music and influenced.
When proper and common words are intermingled (as with "David and Goliath–esque"), it quickly becomes difficult to tell where the compound string is supposed to start. So even though Chicago says it's okay, I would avoid the form
David and Goliath–esque
Another option, with lowercase or mixed initial-capped and lowercase words is to use simple hyphens to attach all of the related words and the suffix in a continuous character string. For example:
an eenie-meenie-miney-moe-esque decision-making process
Chicago has a brief discussion of this approach:
7.83 Multiple hyphens. Multiple hyphens are usually appropriate for such phrases as an over-the-counter drug or a winner-take-all contest. If, however, the compound modifier consists [in part] of an adjective that itself modifies a compound, additional hyphens may not be necessary [as in the case of "late nineteenth-century literature"].
This guideline appears to endorse the "eenie-meenie-miney-moe-esque" compound cited above. The corresponding form for "David and Goliath" + "-esque" under this approach would be
Yet another option (this one suggested by the OP) is to put the multiple-word phrase in quotation marks with the suffix attached by a hyphen to that. For example:
a "We the People of the United States"-esque preamble
This would give us
"David and Goliath"-esque
All of these formulations engage in a kind of conceptual overreach that many readers are likely to find either charmingly silly or charmlessly ludicrous. At the very least, you can expect such a treatment to effectively distract the reader from the more mundane matter of focusing on what the writer is trying to say, to attend instead to the manner in which the writer has chosen to say it.