I drew a polygon, and then went to delete the layer I drew it in, but it didn't delete the polygon. I know have a random red shape that isn't attached to any of my layers in the middle of my project. Even if I disable all the layers, the shape remains. How do I get rid of it?
It sounds like you still have it identified.
Choose the identify tool and click somewhere else, the red outline should disappear.
Edit based on comments:
With the picture now, it looks like an unfinished polygon. So when you are editing, and start creating a polygon and never right click to finish it. It is saved until you return to editing that layer. Save the project and restart QGIS, that should remove it.