For all practical purposes, if you signed something twice without seeing what it is, it will be impossible to argue later that you just signed a blank piece of paper/screen. The other party will argue that you obviously saw the terms of the contract, nobody just signs a blank sheet twice. They would certainly win that case in practice, because nobody would believe you.
germany
But in theory, if everyone in the world were to know the objective truth about everything and nobody was lying and no computer system was ever failing,
No
This does not constitute a valid contract. A valid contract needs the terms known to both parties. And they clearly weren't. Even when you asked and they said "we could make the terms available to you", if you said "no thanks, I'll sign anything" that is not a legally valid contract. For a legally valid contract, you have to know what you agree to, both plain knowledge of quality and it's quantity. You cannot give up that right willingly.
One of the most obvious and most court-tested examples might be German labor law, where you cannot agree to deliver "as much overtime as required". Because "as required" is an unknown quantity to you when you sign, such a clause would be invalid. I mean it's obvious, what if the company requires 25h a day, do you have to bring backup? Or just die trying? You can only agree to quantifyable amounts, for example "overtime as required up to a limit of 2 hours a day". That would be a clause with known quantity and as the signer you can decide of the money you get is worth that. This is not specific labor law, it is the basic contract law applied to employment contracts.
You could argue, that with signing something, you showed action in agreement to the verbal contract of "you're consenting to let the doctor see you". Not only would that be redundant, since waiting in the waiting room and then stepping into the doctors office when it's your turn is already a pretty clear action agreeing to that verbal contract, a verbal contract for anything medical would probably not hold up to your countries guidelines. There is a reason they needed two signatures from you.
So to sum it up: In legal theory, writing your name on a napkin and giving it to someone to "agree to anything" is not valid. Even if the offer to tell you the terms. If you didn't know them, you didn't know them and it's not valid. Period.
It also doesn't make a verbal agreement a written one, the terms need to be written down, too, not just the signature.
In practice however, people are lying scumbags and giving someone a signature enabling them to forge anything they like later is a sure way to get scammed, because we live in an imperfect world and judge and/or jury will probably believe the party having two of your signatures on file.