I still can't reply/comment others, so this is an "answer" that actually comments the best voted ones.
I find if funnier to think about the phrasing of the wish, instead of just the overall idea, as it is kind of easier to just think about the meaning, while phrasing it can be tricky because it may allow the djinn to do what it really wants to by that moment: to kill both.
So it seems that the best options for Geralt are either binding their deaths together, or wishing something related to a child--because we know he had to find a way to bind his and Yennefer's fates together.
Someone said death is the final destiny. Well, having a child is also a way of binding two people's fates, isn't it?
In any circumstances, the witcher had to wish something as to necessarily bind their fates together, which by definition goes against his 'principle' of never imposing anything at other people, especially on women and especially on matters such as living with or loving him forever. Because he knew she would die otherwise, killed by the djinn, he had to overlook this principle of his at least this time. So, the critics against asking for a child as being something to be ousted because it would mean and imposition on her does not work, as the same critics would be necessarily valid against any other wish binding their fates together. There was no other way.
Let's say it was death then, something like "I wish us to die together". Ok, djinns can't kill their masters--but what if a master wishes the djinn to do so, or phrase their wish in a way that allows the djinn to do so? So this would be the case, a risky and tricky wish to do in such a situation where a djinn is slightly obsessed about destroying its goddamn master who told him to scram and fuck itself. Would you speak such a wish in such a situation and wait to see what would come of it?
Besides, because of other fragments of the story, I believe the wish was around a child. Something close to "I wish Yennefer to be the mother of my child". Please note I didn't word it like 'to bear my child', nor 'give birth', 'have my child' whatsoever--so the child could be someone other than a biological offspring. The child could be, say, a child of destiny who could become, not out of birth but rather out of parental relationship and love, their true child. Even if it was very unlikely for the witcher to think of such an outcome at that moment... You know who I'm talking of if you read the whole saga.
Anyhow, such a wish would oblige the djinn not to kill Yen, nor even allow her to die, which it fulfils by protecting them both from all the debris of the ruined house. And such a wish would beautifully fit with the whole mess that happens after that with the long saga with Ciri, and the way their bonds become so strongly linked together.
It would also be a witty wish to trick the djinn. Why? The witcher knew all too well that both witchers and sorcerers are sterile. By wishing something the djinn could not fulfil, at least not easily nor instantly, the witcher would at least buy themselves some time and at best get themselves rid of the raged djinn, saving both their arses on top of that.
What other possible clues are there? Well, Yen says she was 'completely astounded', yet she's not someone to be easily astounded. What would be more surprising? To wish for them to die together, or to wish the sterile sorceress to be the mother of his child? Even the fact and the precise moment Geralt realises she was a hunchback also may give some clue on this, because he could have realised it earlier in the story, but it only happens at that critical fight against the djinn and is likely related to his final decision on what wish to make. By realising she was a hunchback, one could think of her having a child to compensate her surely difficult childhood or something alike, but what would this hunchback thing have to do with wishing to die together? I can't think of any possible connections to understand why the author would put this hunchback element in that critical moment if not for bringing a reference to childhood...
'Why me?' and ‘I don’t know whether such a wish can ever be fulfilled. I don’t know whether there’s such a Force in Nature that could fulfil such a wish. But if there is, then you’ve condemned yourself. Condemned yourself to me’, are both comments that would work well with a wish of being the mother of a child, just as much as they would with a wish binding their demises. Right?
Now, if the wish was for them to die together, how come an intelligent lady would find it hard to imagine if 'such a wish can ever be fulfilled'? The djinn could allow them to die together just by waiting for time to take its toll and arrange for it to happen as so for them to die together whilst avoiding to force the death of its master. But to make a couple of steriles have a child? Well, that could be harder, because it's against nature, and death, you know, is just part of nature and happens to all of us, sooner or later.
So, here goes nothing. I think his last wish was for her to be the mother of his child, and that's that. :)