Is there a fundamental equation in string theory and can it be derived from a variational principle?
If you mean an equation from which all properties of string theory can, in principle, be deductively derived, then such an equation is not yet known.
If there is "a" fundamental equation at all in string theory, I guess you're looking for the Polyakov action,
This is basically a rewritten Nambu-Goto action such that quantization becomes easier. For the full string theory, you want the supersymmetrization of this Polyakov-action.
The Polyakov action (or its supersymmetric generalization) is fundamental for perturbative string theory, but it is not sufficient to understand the non-perturbative aspects.
This is an FAQ: see What are the equations of string theory?
Separate names with a comma.