Speaking of VW. From memory, the old Beatle's engine was horizontally placed, much like Subaru's EJ layout. Was there ever a connection?
Yes - Flat fours - the begining - Jowetts before the Second World War were best known for their flat twin engines, but they made a flat four for the Jason and 10hp models in the 1930s. Post war the Gerald Palmer designed Javelin saloon and Jupiter sports models used a totally different design of flat four. Alec Issigonis originally designed the Morris Minor for a flat four, but cost constraints meant it was never used.
Flat-4 engine in a 1955 Porsche 550 SpyderVolkswagen used air-cooled flat-4s extensively in their early days, in the VW Beetle and most early VW designs. Porsche also used the VW engine in the early Porsche 356. This engine was replaced by a Porsche designed flat-4 in the late 356s and the 912. The 914 that replaced the 912 was built in partnership with VW using a VW engine. VW used a water-cooled flat-4 in the third-generation Type 2 until 1991, and until 2005 in the Brazilian version, VW Kombi.
Citroën used an air-cooled flat-4 on the Ami Super, GS, GSA and Axel.
Alfa Romeo introduced a water cooled flat-4 on the Alfa Romeo Alfasud. That engine was later used on the Alfa Romeo Arna, the Alfa Romeo 33, the Alfa Romeo Sprint, the Alfa Romeo 145/146.
Lancia used a water cooled flat-4 on the Flavia and high-end Lancia Gamma.
Subaru produces water-cooled front mounted flat-4 engines marketed as H-4, by which they mean Horizontal rather than the H cross-section normally meant by H engine.