It's not that esse takes the accusative—it's that cupiō takes the accusative, and esse links two things in the same case. In other words, regem is accusative because mē is accusative, and mē is accusative as the object of cupiunt.
This is a fairly common construction in Latin, called the "accusative with infinitive" (or accusativus cum infinitivō ...
Cupere is a special kind of verb. You can use it to talk about something the subject of the sentence wishes to do himself. In that case you use an infinitive as the object and predicate nouns or adjectives are in the nominative:
Cupit rex esse.
He wants to be king.
Normal objects are in the accusative as usual, though:
Cupio placentam edere.
I want to eat ...