Like V configuration piston engines , boxer or flat configuration engines can be made approximately half the length of a straight configuration engines. Compared to V engines boxers are not as tall, offering the ability to position mass lower in the vehicle's chassis, but are wider.
All boxer engines feature low primary vibration as pairs of pistons are opposed and move in a way to cancel out each other's momentum.
Like Vs boxers are more complex that straight engines, having 2 cylinder heads with associated head gaskets, exhaust manifolds etc., and double the number of camshafts, more complex camshaft chains or belts and more complex cooling.
Compared to Vs, boxer engines have a more complex crankshaft as they have a crank throw for each connecting rod. True V's have pairs of rods sharing each crank throw.
The probable reason boxer or flat configurations are not used very often in modern cars is because a straight or V engines are almost always a better choice.
Many cars are now front wheel drive which work best with a compact, transversely mounted engine. A straight-4 or a V6 are much more suitable that a flat-4 or flat-6 in this configuration.
Longitudinal mounted engines are preferred for front-engine, rear wheel drive, the boxer engine's lower mass probably does not provide enough advantage over the simpler straight-4 or V6.
Where boxer's really do seem to work is in air-cooled rear-engined cars (e.g., the VW Type-1 and Porsche 911) where width is less of a concern, the engine must be a short as possible to avoid a large mass behind the rear axle, and the banks of cylinders are easier to cool as they are more widely spaced from each other.
With regards to the modern Subaru layout, which originally featured 4-cylinder engines and all wheel drive, a longitudinal mounted boxer makes sense. To accommodate front wheel drive-shafts the engine must be placed in front of the front axle line, and the short, low boxer engine has advantages. (Compare this with the original all wheel drive Audi 80 Quatro that had a straight-5 hanging way-out ahead of the front axle.)
At one point flat-12 engines were used in racing cars such as the Porsche 917, and many Ferrari F-1 cars (although these were technically 180° V-12s, which may have any cylinder bank angle). Flat-12's proved incompatible with ground-effects as the cylinder heads occupied the space where the venturi tunnels needed to be.