If you measure quality by performance and handling the BMW beats the LEXUS. The thing to understand about the BMW is that the designers put perfomance first - cost of repair is second.
For certain, if cost of repair is an issue at all go with the Lexus. For pure quality from a drivers point of view BMW is where you want to be!
BMW, Porche, and other European cars are all money pits but nothing from Japan can match the drive.