This is a common construction called the accusativus cum infinitivō (AcI), or "accusative plus infinitive". Linguists sometimes also call it "ECM" (exceptional case marking) since we see an accusative in a place where we might not expect one; it's the most common way for entire clauses to be used in noun-like ways in Latin, and can sometimes even show up in English, though it's less common ("search your feelings, you know it to be true"—or for a more normal-sounding example, "she expected him to win").
This construction most often happens after verbs that take both the noun and the infinitive as their objects. For example, sciō tē filiam ejus esse: "I know you are his daughter". We can think of the tē as being accusative here since it's the direct object of sciō, and that's how I've always thought of this construction.
But as you've observed, it's common for the subject of an infinitive to take accusative case, even when it's not the direct object of anything! Because of examples like this, it's possible that it's not sciō giving accusative case to tē in my example, but esse—that is, it's possible Latin infinitives put their subjects into the accusative case, just like finite verbs put their subjects into the nominative.