How can I remove a theme that is no longer in core?
You can create a theme calling it test_stable. Then, you clear the cache with drush cr and uninstall the theme with drush theme:uninstall test_stable. It will solve your problem.
You don't need to create the whole theme; the test_stable.info.yml file is sufficient for Drupal to recognize the theme as present.
As the test_stable theme has been removed from Drupal after Drupal 8.7.x, and that file isn't present in latest versions, before proceeding with what I suggested, I would run drush updbst and check for pending updates.