Theoretical analysis of the doubly radiative decays η (') →π0γγ and η' →ηγγ