I'm seeing the same issue on some devices, both iPhones and iPads, running the production release of iOS/iPadOS 17.0.2.
I thought that perhaps this issue was only with [HKHealthStore isHealthDataAvailable], so as a test I tried bypassing that call and proceeding with the call to [healthStore requestAuthorizationToShareTypes:], wrapped in a try/catch block. The authorization check though just throws an exception indicating the same error, that "Health data is unavailable on this device", so internally, the auth request API is still calling [HKHealthStore isHealthDataAvailable].
The issue doesn't appear on all devices, most seem to work. I have customers with multiple devices and it will work on one but not the other; in some cases it's their iPhone that doesn't work, and in others it's their iPad running iPadOS 17.
I've tried going into the Health App to make sure I've gone through its initial setup in case that was the issue, but it had no effect.
The next step is to create a simple app that demonstrates the problem and submit that to Apple with a bug report, but I've done this in the past and waited years with no resolution or response from Apple.
Were you able to resolve the issue or have you discovered anything else?