I could retrieve a page using /pages?pageId=xxxxx and /pages/pageId. Would this broke DX (developer experience) or any other REST convention (like consistency)?
Nothing wrong with that from a REST perspective - it is normal that we might have multiple resources (each with their own identifier) that have the same representations.
For example, the "authors' preferred version" of an academic paper is a mapping whose value changes over time, whereas a mapping to "the paper published in the proceedings of conference X" is static. These are two distinct resources, even if they both map to the same value at some point in time. The distinction is necessary so that both resources can be identified and referenced independently. A similar example from software engineering is the separate identification of a version-controlled source code file when referring to the "latest revision", "revision number 1.2.7", or "revision included with the Orange release." -- Fielding, 2000
Note that general purpose components won't know that two different resource identifiers point to "the same" representations. For instance, if we have cached copies of both resources, and we update one of them (ie POST, PUT, PATCH), the general purpose component won't know that the other has also changed.
You can, of course, design your resources so that one spelling redirects to the other:
GET /pages?pageId=12345
307 Temporary Redirect
Location: /pages/12345
You can also use HTTP metadata is the representation of one resource is "really" from a different resource
GET /pages?pageId=12345
200 OK
Content-Location: /pages/12345
...