Agreed. get whatever looks clean and well-taken-care-of. Worry about the M5OD and the D35 afterward. Both are easy dirt-simple swaps.
My BII was an early-production 1990 model, which came with a D28, BW1350, and the FM146. It was in good shape though so I went ahead and bought it. I immediately swapped out the D28 for a 35, however I got a good 20K or so out of the FM146 before the output bearing started to make enough noise to be concerning (purposely overfilling these transmissions by a half-quart or so seems to help them last better). Swapping to a M5OD however was just a matter of dropping the FM146 and stuffing the M5OD in. Except for a minor issue with the interior trim for the shifter (mounts further forward, exposing the edge of the carpet), it was all bolt-in.
FWIW, my M5OD is one of the rare factory 2.9L 4x4 ones. It came from a 1990 Supercab Ranger. I've always had the impression this is the one & only year the 2.9L 4x4 M5OD was ever used. I've heard people say 4x4 M5ODs were used in some '90 BIIs also, but I've never actually confirmed it (seems most BIIs built after 11-'89 had the D35 & BW1354 with a FM146).
The 4.0L 4x4 M5OD is exactly the same trans except for the slight difference in gear ratios adsm mentioned. 4.0L ones are quite ubiquitous.