How do aerobic Rhizobium bacteria survive in root nodules while fixing atmospheric nitrogen?
TLDR
One hypothesis for survival is nitrate respiration.

Long Answer
Ampount of oxygen available in root nodules is controlled by the host plant by two ways:


By presence of leghemoglobin 
By the diffusion resistance
Under anaerobic condition the bacteria survives by making use of denitrification process which could be used to produce ATP under anaerobic conditions. 


It is known for a while that, beside nitrogenase activity, in many symbiotic associations between legumes and Rhizobium the activity of nitrate reductase also exists 12. Most of the nitrate reductase ativity has been found to be concentrated in infected bacterial body i.e., bacteriod3. The bacteriod uses the process of conversion of nitrate into nitrite for creating a proton gradient which is inturn used for generation of ATP.
Reference.