Bulding and running the attached example with 5.15 succeeds.
With the snapshot from the installer, we get
QQmlComponent: Component is not ready
":2 module \"test\" is not installed\n"
The same happens with a recentish cmake developer build (qtbase: 6bbf3f0257603eb39d5511910e8bee1ed862b6cf, qtdeclarative: 27d674e9ec226559bb6a18085f570928e277fa1e). It appears that qmltyperegistrar isn't run at all (test_metatypes.json exists, test.qmltypes does not; no mention of qmltyperegistrar in the make file).