There are two possible explanations. First check the state of your flan or tartlet tins: the surface of cheaper ones, even those labeled nonstick, may become scratched or pitted after a time and this can cause sticking. Good quality tins are a worthwhile investment. Second, don't allow tarts to cool in their tins for too long after removing them from the oven: they may stick if the pastry contains any sugar or fruit juice. Just leave the pastry case in the tin for a few minutes and, when it is firm enough, slip it out carefully and leave it on a wire tray to finish cooling.