The major difference between the two is that pea has tap root system which includes lateral and primary root.
While onion has fibrous root system.
Tap root system is found in gymnosperms and dicotyledons where as fibrous root system is found in monocotyledons.
Moreover, pea has a root which penetrates deep inside the soil as it has tap root system unlike onion root.