If your project specifies 4.0 as the target then it won't even get loaded on the 3.2 phone - no problem.
When you publish an app to the store you specify the minimum OS level and acceptable devices (so you don't go looking for GPS on an iPod Touch, for example). There is a compatibility check that should prevent an app being loaded if it is not compatible. The App approval process (hopefully) makes sure that what you have said is compatible actually is.
If you somehow use APIs that don't exist on the device (because you are targeting a version prior to the introduction of that API or for any other reason) then yep, you'll get a crash due to unknown selector.
You can use
#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 30200
to check what version you are targeting... the first number (3) is the major revision, the third number (2) is the minor revision. Hence the check shown is for 3.2.