> ORMs solve this partially at best at the cost of hiding the capabilities of the underlying database.
This is because all the popular ORMs target SQL instead of a specific RDBMS technology, like Postgres or SQLite. That doesn't have to be the case.
> They also obscure the structure of generated queries, making it difficult to understand the resulting performance implications.
Not quite true, Django for example makes it easy to do raw queries, and every generated query has .query() and .explain() methods to analyze the resulting SQL. This has always been a lame excuse to dismiss ORMs.