That happens because by default Aesara tries to find the support shape (2,) by looking at the shape of the parameters. Your DensityDist has no parameters, so it fails to do so.
I actually don’t know if you can pass the _supp_shape_from_params function that would return this information to DensityDist to override the default. We could try to do this when shape is provided in PyMC as that is sufficient (Aesara uses size internally, not shape, so it never sees that (2,))
We should open am issue on PyMC GitHub for this.
Aesara error message could also be better.