Welcome to board. You are going to love the M5. Lucky for you, your M3 was SMG so no worries. By the way, nice M3 what kind of supercharger did you have? You'll miss the nimbleness of the M3 and the overall feel of being one with the car. The M5 is a little too big and you'll notice that especially coming from E46 M3. But you'll get used to it since the M5 hides its mass really well. It is a lovely car and the engine is a masterpiece. To me, it feels just as raw as the S54, and then some. The power, luxury, ride and features just blow the M3 away (I still love the M3!!). The V10 is very reliable. The car itself with all the electronics which could could fail overtime, warrants an aftermarket warranty for piece of mind. So think about getting one before the BMW warranty runs out.
As for recalls or issues, mostly the early M5 with 2005 production dates had the issues, such as VANOS, steering angle issues (not sure what it was). As for SMG pump/motor failure, it is just the luck of the draw. You'll see mostly 2006 M5 with problems and a few 2007 for sure. But overall, I would not worry about them. As long as the car has had all the issues addressed by the dealer, then it won't be any issue. Call your service advisor and give him the VIN number and get service history. If there are any open recalls/campaigns, then they will take car of it as long as the car is still under factory warranty which it should be. It goes without saying, if the car has been taken care of by the previous owner, it will be just fine. With higher mileage, obviously other things may need to be replaced but that goes for any car. The M5 is no exception. Enjoy the car.