As you have noted, it's unclear. That means it's DM's call.
There are a large number of points in the rules of 5e that are not entirely clear. It is explicitly intended that the DM adjudicate those things at their table. It's just one of the features of the game system - they're actively encouraging table adjudications and houserules.
That having been said...
This is in a published book. We can make a reasonable assumption that the wording is as intended... and the wording doesn't say. If we look at the rules for Bardic Inspiration, we see the following (emphasis mine):
Once within the next 10 minutes, the creature can roll the die and add
the number rolled to one ability check, attack roll, or saving throw
it makes. The creature can wait until after it rolls the d20 before
deciding to use the Bardic Inspiration die, but must decide before the
DM says whether the roll succeeds or fails. Once the Bardic
Inspiration die is rolled, it is lost. A creature can have only one
Bardic Inspiration die at a time.
The wording here states outright that in this particular case, the player must decide before the DM says whether the roll succeeds or fails. By implication, then, that's not inherent in the fact that it's giving a bonus to the roll.
As such, it should be possible to give a bonus to a roll after success or failure has been determined - and, indeed, the Divine Soul sorcerer's Favored by the Gods feature (XGtE, p. 50) does this - and Flash of Genius leaves activation in the hands of the player.
Thus, it would make sense that the player could wait until after success or failure had been declared before deciding whether or not to use Flash of Genius.
eidt: and, we now have new information... sort of. The Sage Advice Compendium offers a not-entirely-clear clarification to go with the above.
You use Flash of Genius immediately after the triggering d20 is
rolled and before any of the effects of the roll are applied.
Unless a rule tells you otherwise, a reaction occurs immediately
after its trigger
So... it's after the roll, but before the effects are applied. Yes, that seems to cover both of the previously described options. Admittedly, it does tend to nudge it closer to the "probably before success/failure is declared" side of things, but to my eyes it's still firmly within DM adjudication land.