I just had a go with the different pkg-config utilities. The difference appears to be that the MSYS2 version prepends the relevant path when run outside of the MSYS2 environment. I guess the pure-perl version could be taught to work with such paths but it's perhaps only an issue because these builds are using mingw64 files?
Windows cmd shell:
C:\path>set PKG_CONFIG_PATH=C:\msys64\mingw64\lib\pkgconfig
C:\path>pkg-config --libs glib-2.0
-L/mingw64/lib -lglib-2.0 -lintl
C:\path>\msys64\mingw64\bin\pkg-config.exe --libs glib-2.0
-LC:/msys64/mingw64/lib -lglib-2.0 -lintl
MSYS2 mingw64 shell:
$ pkg-config --libs glib-2.0
-lglib-2.0 -lintl