Yes, it does remember them. X-Plane attempts to map different hardware into different "slots" in the preferences file. Each configuration is disjoint; you can even have the same axis assigned twice as long as you don't plug in both hardware devices at the same time.
Unfortunately null zones and some of the 'tuning' parameters are not saved separately per device.