When a clause is subordinate to a nominal form of a verb (anything that does not have a grammatical person), the conjunctive predicate of the subordinate clause follows the predicate verb of its main clause, not the nominal form.
For example: Me adiit mirans, cur Graeci sic loquerent. (Here loqui follows adire, not mirari.)
There is, however, an exception:
If the clause is subordinate to a perfect infinitive, then the main clause is considered to be past tense from the point of view of consecutio temporum — no matter what the predicate verb of the main clause does.
The example in the question falls in this exceptional category, the correct choice is the second one: Puto te scivisse quid esset nomen meum.
The exception only concerns the perfect infinitive, so this would also be grammatical (although it expresses a different thing): Putabam te scire quid esset nomen meum.
This rule covers all clauses subordinate to a nominal form, be it ACI or something else.
I understand this to include participles as well, as long as they are not part of a passive personal expression.
(That is, this would be wrong because the participle forms a personal form with esse: Miratus sum, cur ita sit. Although sum is present tense, the whole verb is really miratus sum and has past tense. Therefore we should have esset.)
Therefore I would say, for example: Caesare mirato, ubi sint milites, narrabimus ei de bello.
"After Caesar has wondered where the soldiers are, we will tell him about the war."
Since the nominal form is not a perfect infinitive and the predicate of the main clause is in the future tense, the subordinate predicate is sint, not essent.
This example is artificial, and I would like to see a classical example to be sure.
This answer is based on Ars Grammatica by Tuomo Pekkanen (in Finnish).
If anyone can find other sources that are easier to find and read for the majority of users, let me know.
The book gives these examples which turn out to be from Cicero:
Oh, and it should go without mention that this rule is subject to the usual exceptions to consecutio temporum.
In particular, if a perfect tense is semantically present tense (novisse or oblitus, for example), then it may be regarded as present tense in a main clause.