OWASP API Security recommends defining schemas for all responses, even errors. The 500 describes what happens when a request fails with an internal server error, so it is important to define this for documentation and contract testing.
OWASP API8 2023 Define Error Responses 500
Message: Operation is missing a 500 error response.