Exploring the link between star and planet formation with Ariel