TYP/COMPAT: don't use Literal for Series.ndim to avoid tab completion bug in IPython
Not entirely sure if it is up to us to "fix" this, but given this has not been fixed upstream for several months, and it is quite annoying that tab completion doesn't work in IPython by default, this might be an easy win short-term (with only a minor decrease in correctness of the type annoations)

xref https://github.com/ipython/ipython/issues/14412, https://github.com/davidhalter/jedi/issues/1990

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Thanks @jorisvandenbossche 