You realize with a 30K budget you could own a 2014 335i XDrive with less than 45K miles on the odometer. I owned both a 2014 328i and a 2014 335i and could tell you that compared to the 328i, the 335i is like a rocket ship. If you're not looking to modifying your car in the future, the 328i will do you just fine. The only difference is I4 vs I6, but both are turbo charged. Maintenance on F30+ isn't expensive at all, just keep up with oil changes that you can DIY for around $50.
With a budget of 30K, your option of getting an E92 M3 is insane. Unless you can get a GREAT deal on it, I would advise against it for it'll get you horrible gas mileage compared to a 328i or 335i. They might develop a rod bearing issue overtime and thats like $3K down the drain. I would personally only purchase a E92/E90 M3 as a Sunday car with deep pockets.
328i vs 320i?
Both of them are the same car, but with different specs. The 320i is essentially a "detuned" 328i as some people regard it. With a car full of people(adults), the 328i seemed "slow". Some people might laugh at you for owning a 320i, but it's obvious if you do, with its single tailpipe exhaust. Especially when you want to drive your friends around, want XDrive (4WD), you want the extra horsepower.
Go for the 328i if those are your options.
Hope I helped! If you have anymore questions just ask!