We are in 2019 and Apple finally (!) added a possibility to delete an app in "Prepare for Submission" state which was not previously accepted in the App Store at all (for example if you added a test app only for Testflight).
Now you can simply go to "App information" section and at the bottom you will see "Remove App" option which removes the entire application.
Also Apple's website with help: https://help.apple.com/app-store-connect/#/dev28d17ed35 was updated and now it confirms that you can remove apps in "Prepare for Submission" state:
To remove an app from your main view in My Apps, it must be first
removed from the App Store and any associated in-app purchases must be
removed from sale.
Additionally, you can only remove apps if all versions of that app are
in one of the following states:
- Prepare for Submission
- Invalid Binary
- Developer Rejected
- Rejected
- Metadata Rejected
- Developer Removed from Sale
- Removed from Sale
Apps can’t be removed if they are part of a Game Center group, in an
app bundle, currently available on the App Store, associated with
in-app purchases available for sale, or if they're being actively
transferred to another account.
If the app is part of a Game Center group or app bundle and hasn't
been approved yet, it must be removed from the group or bundle before
it can be removed from your main view in My Apps. App bundles and
approved apps that are part of a Game Center group cannot be removed.