We study thermalization and spectral properties of extended systems connected, through their boundaries, to a thermalizing Markovian bath. Specifically, we consider periodically driven systems modeled by brickwork quantum circuits where a finite section (block) of the circuit is constituted by arbitrary local unitary gates while its complement, which plays the role of the bath, is dual unitary. We show that the evolution of local observables and the spectral form factor are determined by the same quantum channel, which we use to characterize the system's dynamics and spectral properties. In particular, we identify a family of fine-tuned quantum circuits-which we call strongly nonergodic-that fails to thermalize even in this controlled setting, and, accordingly, their spectral form factor does not follow the random matrix theory prediction. We provide a set of necessary conditions on the local quantum gates that lead to strong nonergodicity, and in the case of qubits, we provide a complete classification of strongly nonergodic circuits. We also study the opposite extreme case of circuits that are almost dual unitary, i.e., where thermalization occurs with the fastest possible rate. We show that, in these systems, local observables and spectral form factor approach, respectively, thermal values and random matrix theory prediction exponentially fast. We provide a perturbative characterization of the dynamics and, in particular, of the timescale for thermalization.