All perfect praise be to Allah, The Lord of The Worlds, and may His blessings and peace be upon our Prophet Mohammad and upon all his family and companions.
There is no harm for the person who has an account in a Sharia-compliant bank to make a withdrawal from the ATM of a usurious bank in return for a certain fee.
Moreover, there is no harm that the ATM charges a fee because it is in exchange for a service and Sharia permits charging a fee in exchange for a benefit, even if it was from a usurious bank since jurists have permitted dealing with a party whose wealth is a mixture of what is lawful and unlawful.
Al-Imam Ibn Hajar said: "It isn`t forbidden to engage in a transaction with someone, most of whose wealth is unlawful, nor to eat from it" {Tohfat Al-Mohtajj, 9389}. And Allah knows best.