Raising taxes is the best way of financing UBI. Eliminating some transfer programs will help, but eliminating all of them (like Medicare) will cause significant pain and suffering.
Most sane UBI proposals have taxes going up just enough so that taxes on the middle class go up enough to offset the UBI; resulting in no net benefit or cost to the middle class.