Does the medic remove cubes of the final cured disease (and thus eradicate it) before the game ends in a win?
Yes, according to Matt Leacock (one of the game's designers) on a BGG thread for Pandemic Legacy Season 1, the disease is eradicated. The medic's ability is immediate, so the cubes are cured and the disease eradicated. Pandemic Legacy Season 1 has rules very similar to those of Pandemic, so I wouldn't hesitate applying this ruling to the regular Pandemic.

Note that in Legacy, unlike vanilla Pandemic, eradicating a disease has consequences in terms of game-end upgrades, so the timing of things is quite important.