There are a lot of openings where black equalizes quickly by allowing this queen trade in exchange for castling rights. Usually it happens on these open e4 games. Technically white should have a slight edge, but it's really hard to prove on such an equal setting with everything still to play for. As soon as queens are traded, the urgency to castle slows down. Usually you can make a nice little pawn pocket to hide your king anyways, and even get it closer to the action that way.
Here is a great example of playing a position similar to yours (arising from Berlin defence on Ruy Lopez) by Anand vs. Carlsen:
I'm a little bit proud of this game. Normally, it's considered bad to allow your Queen to be taken by the opposing Queen because it means taking back with your King and so relinquishing Castling rights, but I reason that if both Queens are off the board, the need for castling is lessened anyway, and in fact it's more useful to have the King in the center of the board helping out than stuck in a corner doing nothing. Anyway, I put this idea to the test in this game with a favourable outcome. I've tried it once before and also won then. How good a strategy it is in general I'd be interested to hear what people think.