Eurostyle is correct, as with any high end car like an M5, there are certainly no cheap repairs. Even regular maintenance cost a little more than usual. Also keep in mind that this is even worse for other cars in the same category. You need to expect a certain increase in costs when owning a car like this for sure.
As far as regretting the purcahse without warranty, do your homework and find a good place to have it maintained and repaired and that is all you can do. Used cars come with risk, I do not think there is any more risk with an M5, and in fact I think less risk if you researh and find a good one.