Your problem is that that path has a space in it. You would need to escape the space or quote the entire path.
Well, let me rephrase. The problem with that specific "open" command is the space. And the problem with the other open command is the question mark.
But a more fundamental problem is that you are even attempting this in the first place. Please review with eskimo said. In macOS, it is the end user that has the ultimate power over the system, not the root user. This is a fundamental design change from traditional Unix. You cannot and should not attempt to bypass it. Eskimo is being a bit coy in saying "Attempting to bypass that is not going to end well". What does that really mean? I may mean that you spend months developing an app only to see it rejected by Apple and getting yourself kicked out of the Apple developer program. For a Mac app no less. There isn't even any money to be made there. That what the iOS App Store is for. Why would you want to take that kind of risk?
Is there some specific reason why you need root? Some reason other than hacking accessibility, which root can't even do?
If not, then you can just display a dialog asking the user to add the app to accessibility. If that's your market (for whatever reason), they should be able to do that themselves. If they can't, then you probably don't want them as customers. And I mean that respectfully. Some people just shouldn't be running certain apps.
And finally, please don't ever use "bash". "bash" is an interactive shell. For political reasons, it switched to using a restrictive license over ten years ago and Apple has been unable to update it ever since. If you do need to perform some shell operation, stick to "/bin/sh". Don't assume that any future version of macOS will include or allow ANY shell operations. I always tell people to think of how they would implement something in iOS and use that approach for the Mac. It is virtually guaranteed to be successful and future-proof.
And for the record, services like MacUpdate, MacPorts, Homebrew, SetApp, etc. do NOT require SIP to be disabled.
If you did want to deep-link into System Preferences, then you can use those "x-apple.systempreferences" URL. But it is silly to do that from bash. And the bash syntax that you have been given is flat-out wrong. Instead, you can have your app open that specific area in system preferences itself via NSWorkspace. Then you don't have to worry about escaping the question marks for bash. However, please be aware that this will make your app ineligible for the Mac App Store. If you are OK with your app living perpetually in the weeds while the best customers in the world are shopping inside the walled garden, then go for it.