For wizards, knowing a spell means having it in their spellbooks.
(Player’s Handbook pg. 310)
This means that a wizard can take two spell slots of the same level—regardless of whether or not spells are prepared in them or what spells those are—to cast any spell they have in a spellbook, since while Versatile Spellcaster requires spontaneous spellcasting, it never specifies that its benefits solely apply to spontaneous spell slots or spells you know that could be cast spontaneously. In fact, since wizards are free to scribe spells into spellbooks regardless of their ability to cast that spell, this means a wizard can use two spell slots of their highest-available level to cast a spell they could not otherwise cast.
There is also some question of what, exactly, “having it in their spellbooks” really means—or how much access to a spellbook you need to have for it to be “yours.” Does any spellbook you have ever possessed count? Presumably not. Does a spellbook you left home? What if you prepared spells from it that morning, but left the book somewhere safe? Ultimately, none of this is specified by the rules—you will have to ask your DM. But even if they go as strict as I can imagine—requiring you to literally have the spellbook in-hand as you use Versatile Spellcaster—the feat is still extremely powerful.
Note that a wizard need not actually also be a sorcerer (as with ultimate magus) to qualify for Versatile Spellcaster. The spontaneous divination alternate class feature from Complete Champion can replace a wizard’s 5th-level bonus feat with the ability to spontaneously cast divinations from slots prepared with other spells, similar to how clerics spontaneously cast cure or inflict wounds and druids spontaneously cast summon nature’s ally. This feature meets the requirement for Versatile Spellcaster. And since spontaneous divination is already a quite-powerful ability, and any wizard (not just diviners) can take it, Versatile Spellcaster cannot be considered a strong reason to become an ultimate magus. If you were already going for ultimate magus, though, it is a pretty good feat.