If it was undercooked, then most likely, it was not curdled at all. Rather, it was in the process of cooking, and what you saw as a partially cooked custard when you removed it from the oven. A curdled custard will look very lumpy. When it is very curdled, it will look like cottage cheese.
It's entirely possible that I visually misidentified it, I remember that the fat had separated (you could literally dab the oil off the custard with a paper towel), but I can't 100% say if it was lumpy or not. I
think it was lumpy, but could be misremembering. However, I actually baked another batch yesterday where it was overbaked and curdled, and I feel like it had the same texture.
In fact the batch which I made yesterday was entirely a different problem. I used
this recipe, but while the recipe calls for baking at 240°F (465°F) for 15-20 minutes, I baked at 475°F for
30 minutes, and even then the top wasn't very well browned - I had to turn the broiler on and leave the pan under the preheating broiler for 1.5 minutes to get it more satisfactorily browned. Since in the batch I talked about in the original post I baked for well beyond the specified time and still ended up with a creamy filling, I hoped it would turn out okay even with the extra cooking.
The two differences from the recipe was that I baked in disposable aluminum molds and I used regular puff pastry instead of the special pastéis de nata puff pastry (the entire reason why I make these are to get rid of excess puff pastry lol), but I don't think either of those would have an effect on how the top colours. I think my oven only heats from the bottom and that may be the cause, but in previous batches where I used higher heat and/or baked on a higher rack, I had issues with the crust edges completely burning before the bottom/sides of the pastry were even cooked.