The system include path and system library path are hard-coded into the pkg-config executables as UNIX style paths. That leads to those paths not matching literally in the MinGW environments where paths are converted to Windows paths.
Also set environment variables with the same paths. That works because environment variables are automatically converted for MinGW executables.