TYP:Replace union of subclasses with base class.
- [ ] 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
- [X] 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.

I am splitting this out of #49531 . In order to refactor the code in that PR, I had to change the return type of `pandasSQL_builder`, and that forced me to make additional changes in order to make mypy pass in CI:
* Line 581 (`pandas_sql.meta.reflect(bind=pandas_sql.connectable, only=[sql])`) was failing mypy, but it can be deleted since the table is reflected in `SQLDatabase.get_table`, when the `sqlalchemy.Table` object is created.
* I declared all required functions in `PandasSQL` and made the abstract.  I then made all the arguments agree between `PandasSQL` and subclasses.
@mroeschke , is it ok to merge the PR's that I create out of #48576 one at a time, or do you want me to get all the PR's set up and ready to merge first? Thank you @cdcadman !