Free boundary problems in PDEs and particle systems