For simplicity, I will use the Nambu-Goto action, but the following question would probably be the same for the Polyakov action.
According to David Tong's lecture notes on string theory, the Nambu-Goto action of a bosonic string is given by $$S[X] = - T \int_{D} \sqrt{- \det(X^\ast \eta)} \mathrm{d} x^1 \wedge \mathrm{d} x^2$$ where $X: D \to \mathbb{R}^{d-1,1}$ describes the path of the string and $D = I \times [0,2\pi]$ is a rectangle. For closed strings one assumes that $X(\cdot,0) = X(\cdot,2\pi)$.
My question is the following: since the map $X$ needs to be differentiable, isn't the Nambu-Goto action only describing string theory on a torus? If this is true, then the map $X$ should actually take the form $X : \Sigma_g \to \mathbb{R}^{d-1,1}$ where $\Sigma_g$ is a Riemann surface. This would then be a sigma-model.
One could argue that the action is only a local description of a more complicated Riemann surface, but then we would never need the boundary condition $X(\cdot,0) = X(\cdot,2\pi)$. In this case, it would also be impossible to compute the global minimum of the action.
Maybe there is a more fundamental question lurking behind: what is the interpretation of the Nambu-Goto action? Is it describing the path of a one-dimensional object in Minkowski space, or should we interpret it as a field theory on a rectangle/Riemann surface with values in Minkowski space?