With the iPhone, the advantage of having all the settings in the Settings.app is clear - the user knows exactly where to find the settings.
There are also big disadvantages, which has meant that in practice almost no apps do this anymore.
The first is that you are a little limited by what you can put in the settings, and doing things like validation on custom data is difficult/impossible.
The second is that, as you mention, you have to exit the app to get to it. This was a much bigger problem back when the phone didn't have fast app switching, but it's still a bit of a pain and inertia has meant that now very few apps use it.
I think that this could potentially be mitigated by allowing apps to have a button that will launch the Preferences.app panel inline. That way there is the best of both worlds - you can easily change the preferences in app, but you can also get to it from one, unified preferences app. This does, of course, come with the downside of having two places to access one feature.
The ability to add your app to the system preferences in OS X serves a slightly different purpose. The sorts of apps that add themselves to the system preferences app are utilities, especially so called headless utilities (they run in the background and have no visible window). Without an obvious window or menu to access the preferences like you would with other apps, the system preferences app provides a logical place to access the preferences without a separate, dedicated "MyUtility Preferences" app.
When creating your own consolidated preferences app, I think you need to keep in mind that it should be easy to access the preferences from the place the user will logically most want to access it (in most cases, from the app itself). You also need to provide a very flexible framework to allow app authors to do some complicated things like custom data validation if you want them to use it.