Not gonna lie, Kaguya was pretty smooth there at the end.
Also, it's kinda hard to believe that people wouldn't vote for Miyuki because he doesn't come from a rich family. Sure, it'd make sense on such a school and it's mentioned that there's a gap between the "pure" and "impure" students, but it's never actually shown. Everyone respects Miyuki and nobody holds his more humble origins against him, not eve behind his back.