Would it be correct to use the question mark as it is written in the following sentence? "If your cousin invites you to visit—and why would he not?—I will expect your return after only nine days."
According to The Chicago Manual of Style, sixteenth edition (2010), it is acceptable to position a question mark immediately in front of a closing em dash. Here is Chicago's entry on this topic:
6.87 Em dashes with other punctuation. In modern usage, a question mark or an exclamation point—but never a comma, a colon, or a semicolon, end rarely a period (see 14.46)—may precede an em dash.
Without further warning—but what could we have done to stop her?—she left the plant, determined to stop the union in its tracks.
The Oxford Guide to Style (2002), at 5.8.1, concurs:
The question mark can be followed with a dash where necessary:
He left—would you believe it?—immediately after the ball.
And Words into Type, third edition (1974), without referring explicitly to dashes, also agrees:
Direct questions. Use a question mark after a direct question.
[Relevant example:] Nor was it it disclosed—why need it have been?—that John had taken the case.
The three example sentences cited above are syntactically indistinguishable from your example:
If your cousin invites you to visit—and why would he not?—I will expect your return after only nine days.
So multiple style guides view this form of punctuation as lying within the pale of acceptable usage.