Longitudinal engines are fine, but have packaging issues. The power pack either intrudes into cabin space, or pushes the engine ahead of the front wheels, making the car more prone to understeer. Audi seems to have it sorted out fairly well now.
The flat 4 and 6 in the Subarus are pretty short engines and help mitigate the packaging issues.