We present a formalism for studying the radiation-matter interaction in multilayered dielectric structures with active semiconductor quantum wells patterned with an in-plane periodic lattice. The theory is based on the diagonalization of the generalized Hopfield matrix, and it includes loss channels in a non-Hermitian formulation. Hybrid elementary excitations named photonic crystal polaritons arise in these systems, whose detailed dispersion and loss characteristics are shown to depend on material composition as well as on symmetry properties of the lattice. We show the generality of the approach by calculating polariton dispersions in very diverse material platforms, such as multilayered perovskite-based lattices or inorganic semiconductor heterostructures. As an application of the method, we show how to engineer lossless polariton modes through excitonic coupling to bound states in the continuum at either zero or finite in-plane wave vector, and discuss their topological properties. Detailed comparison with a semiclassical approach based on the scattering matrix method is provided, which allows to interpret the optical spectra in terms of polarization-dependent excitation of the different polariton branches. This paper introduces an efficient and invaluably versatile numerical approach to engineer photonic crystal polaritons, with potential applications ranging from low-threshold lasers to symmetry-protected propagating modes of hybrid radiation-matter states.