We consider variational problems involving nonlocal free energy functionals that arise from Gibbs measures with Kac potentials and are related to the characterization of the optimal (i.e., typical) shape of an interface under given constraints on the magnetization profile.