Probably the G, but only by a hair. Overall I like the BMW better.
The 535i is a better driving car with a nicer interior IMO, but you are concerned about longevity and reliability. We would have bought the 535i instead of the 528i if it weren't for the fuel system issues. And the V8 gets much worse gas mileage and costs more money up front - not an ideal combination for us.
Our 528i has been very reliable and low maintenance so far, but we do not plan to keep it past 80-100K miles. It has had a number of very minor, electronic glitches that don't affect anything but are mildly annoying (sometimes the displays are metric instead of miles, occasionally the iDrive screen goes blank, once there was a shrill squeal coming out of the speakers), and could never be replicated. The dealer solution is to install the latest software updates. There is an outstanding recall for it right now to fix a terminal in the trunk. To replace the battery the dealer had to pull the dash out because the connector to program the ECU to register the new battery was not attached where it should have been - but the dealer covered the battery (and all labor) under warranty at 4 years and 49K miles - which I thought was great. If the car is not going to be driven much, BMW recommends putting it on a battery tender due to the parasitic draw of the electronics when the car is 'sleeping'
The infiniti has had minor issues too, but they have been simple. Power window motor, radiator fan - both replaced under warranty. Out of warranty was a slave cylinder (which is easy on mine, but major labor on the newer ones) and two Xenon ballasts. There have been no glitches, no strange behavior. It can sit for a month and not need to be charged. The Infiniti currently has almost 3 times as many miles as the BMW and gets driven much harder.
My biggest complaints with the G w/ the manual transmission (only) is the engine noise above 5K RPM. It just sounds unrefined, unlike the BMW which sounds better the higher it revs. Also the brakes on the infiniti are not as good as the BMW. They can stop just as fast a couple times, but fade and wear more quickly than the BMW brakes. I have tried a few different pad combinations, none of which have worked overall as well the OE brakes on the BMW. The newer sport package brakes are supposed to be better, but still have some issues with fade if you drive hard. They have more surface area though, so a fix may be better pads or fluid.
Overall most of the interior components are similar, but I prefer the more minimal layout and feel of the BMW. I also feel like you get more car for the money with the BMW - especially with the infiniti prices getting higher year after year. Some of our BMW controls have gotten scratched and scraped over time allowing backlighting through, where the initially cheaper feeling infiniti buttons are exactly the same as when new except a little shinier. The iDrive is a bit better on the '08+ cars, but still overly complex at times - particularly for some radio functions.
The adaptive xenon headlights on the BMW are better without a doubt than the fixed xenon headlight in the Infiniti. I have not compared the halogen equivalents.
I suspect that as the miles rack up the expenses of maintenance like clutch, brake, suspension work, etc. should be less expensive on the Intiniti. The infiniti does not have any crazy service procedures to do DIY work like brake pad replacement without risking losing a finger, or having to tell the ECU when the battery is replaced.
The BMW does allow longer service intervals, but I do both of their oil changes at about 7K miles.
So in short, I think the BMW is a better drivers car all around while it is under warranty and with low miles. I think the infiniti wins if you plan to own it far out of warranty and with potentially higher mileages and don't have to have 100% of the BMW driving dynamic.
Since you already have a 530i, you may have a better idea of what long term maintenance is than I do.