I'll agree with piiperi's answer that the surprise is the A7 chord (as OP suggested in the failure of the D7 to resolve properly), but otherwise I'd analyze the whole thing a bit differently. In particular, I'd say the A7 is actually what makes the song interesting -- what raised it from the pedestrian and turned it into a jazz standard. Perhaps not that specific chord (as different arrangements of this song do it a little differently), but the harmonic surprise in that moment.
This is a pretty standard 32-bar chorus with a half cadence at the end of bar 16. (See the lead sheet in dmb's answer.) I bring that up because the lead-up to the half cadence is through D7 to G7 to C7. Very typical circle-of-fifths motion.
That creates an expectation that the final cadence may follow a similar pattern (as it does in a multitude of songs). When the D7 (actually a D7b9) arrives midway through the second phrase, most listeners will expect to somehow go through D7 to G7 to C7 to F and conclude. That would be the standard "boring" way to end this song.
And the melody hints at first that it's trying to do that. Starting at the D7, we begin a melodic sequence: Eb-D-C is mirrored with A-G-F in the next two bars. If this were a boring normal song, you might harmonize this with D7b9 under the Eb-D-C, then some sort of G9 under A-G-F to make a nice circle-of-fifths sequence. Then the melody might continue down to finish off the 8 bars something like:
- mm. 25-26: Eb-D-C-D (chord D7b9)
- mm. 27-28: A-G-F-D (chord G9)
- mm. 29-30: C-E-G-A (chord C7) (melody altered from original)
- mm. 31-32: F (chord F)
That would create a very standard circle of fifths motion that would parallel what happened in the first half of the chorus. (Note those aren't the most inventive chord choices: just trying to show the basic outline of the progression.)
But that would be like any run-of-the-mill song. Isham Jones was brighter than that, though. He decided to make this ending interesting. So instead of a standard circle-of-fifths turnaround, he must have thought, "Hey, let's bring back the opening motive to make a less standard approach to the cadence." And that's what you see in the final four bars. The opening melodic motive returns (D-F-G-A), except here it finally resolves down to the F tonic.
Well, it's obvious that you can't put that D-F-G-A motive over a standard dominant chord. You also likely would want to hint back to the opening harmony too. So now you have a question: how to get back to that IV chord for the opening motive?
And the answer is by failing to fulfill expectations. You set up the D7 chord, as would be expected at that point in the chorus (again, mirroring the first half of the chorus), and you even enhance it with a flat-9 addition to give it extra punch. It's clearly meant to sound like V7/ii. That would be the obvious chord at that point, and any listener who has heard a hundred jazz songs of that time would find that normal.
But then, Jones throws you for a loop. You have what sounds like a potential melodic sequence (as though you wanted to continue to G7), but instead there is a reharmonization with V/vi to vi. Why? Because it needs to go to IV to set up the opening motive before the final cadence. The harmony leads very well into that. (Note that the original Jones version is actually an even weirder more disruptive progression at that point, but overall it's trying to lead you back to the IV chord so the opening motive can come in.)
The power of dominant seventh chords is that they can pull you any which way, and they can turn on a dime. In this era of jazz and Tin Pan Alley, songs do this all over the place. You don't need to hear the resolution of the dominant seventh to feel the "pull" as dominant. The D7 wants to go to G, but instead of hearing that, you get a new dominant seventh A7 which immediately reorients your ear. The descending G-F as the A7 resolves to D makes such a strong resolution that you soon don't care how you got there. And it sets you up for the final gesture, which mirrors the opening of the chorus.
To my ear, that A7 isn't "duct tape" -- it's the most interesting progression of the entire song. It's the moment when your ear perks up and says, "Woah! What's gonna happen now?!" And the answer is a great final bookend to the chorus.
Could you lead into that A7 more smoothly? Of course. But then it wouldn't have the punch. (And again, note the original versions linked above from Isham Jones in 1924, which have an even stronger denial of the D7 chord's implication.) Composition is about setting up expectations for a listener and then either fulfilling or denying them. When that D7b9 arrives, I guarantee you that most listeners of music at this time would "check out" and say, "Oh, I know how it's going to end. Standard circle of fifths." Except it doesn't.
As to the question of what to label the chord: yes, I'd say it's clearly a V/ii, because that's the chord you'd expect at that point based on the first part of the chorus. But it doesn't resolve as expected. If this were a game of chess, you could annotate the chord sequence thus: V7b9/ii - V7/vi(!?) - vi - IV (!) - iv - V7 - I.