The money for the Eurovision Song Contest comes from (smallest to largest) commercial exploitation via music sales, tour and merchandise, entry fees, extra contributions from the big 5 broadcasters, and (the vast majority) the host nation’s broadcaster.
Ad boycotts would not have a material impact as even the big 5 pay a paltry sum in TV terms (no up-to-date numbers but the BBC contributes around £300k) so even the broadcasters who do run advertising wouldn’t miss out.