IMO it's an interesting topic if the kings were in fact "generous" when they commissioned these things. I think there is an argument that these investments were mostly for their own legacy and that the resources could have been spent more efficiently to raise everyone's standard of living or reduce poverty. IMO just spending every cent possible on research to get non-terrible medicine would be far and away the highest priority. But of course I only say that because I know from today's perspective what is possible.