Context. Spiral galaxies M31 and M33 are among the γ-ray sources detected by the Fermi Large Area Telescope (LAT). Aims. We aim to model the broadband non-thermal emission of the central region of M31 (a LAT point source) and of the disk of M33 (a LAT extended source), as part of our continued survey of non-thermal properties of local galaxies that includes the Magellanic Clouds. Methods. We analysed the observed emission from the central region of M31 (R < 5.5 kpc) and the disk-sized emission from M33 (R ∼ 9 kpc). For each galaxy, we self-consistently modelled the broadband spectral energy distribution of the diffuse non-thermal emission based on published radio and γ-ray data. All relevant radiative processes involving relativistic and thermal electrons (synchrotron, Compton scattering, bremsstrahlung, and free–free emission and absorption), along with relativistic protons (π0 decay following interaction with thermal protons), were considered, using exact emissivity formulae. We also used the Fermi-LAT-validated γ-ray emissivities for pulsars. Results. Joint spectral analyses of the emission from the central region of M31 and the extended disk of M33 indicate that the radio emission is composed of both primary and secondary electron synchrotron and thermal bremsstrahlung, whereas the γ-ray emission may be explained as a combination of diffuse pionic, pulsar, and nuclear-BH-related emissions in M31 and plain diffuse pionic emission (with an average proton energy density of 0.5 eV cm−3) in M33. Conclusions. The observed γ-ray emission from M33 appears to be mainly hadronic. This situation is similar to other local galaxies, namely, the Magellanic Clouds. In contrast, we have found suggestions of a more complex situation in the central region of M31, whose emission could be an admixture of pulsar emission and hadronic emission, with the latter possibly originating from both the disk and the vicinity of the nuclear black hole. The alternative modelling of the spectra of M31 and M33 is motivated by the different hydrogen distribution in the two galaxies: The hydrogen deficiency in the central region of M31 partially unveils emissions from the nuclear BH and the pulsar population in the bulge and inner disk. If this were to be the case in M33 as well, these emissions would be outshined by diffuse pionic emission originating within the flat central-peak gas distribution in M33.