I take it you were eating it hot so whatever it was was pasteurized by being fully cooked so it should be just fine I think they worry about deli meats and soft cheeses that have not been heated
100% you can have it - there is absolutely nothing in it you can’t eat when pregnant unless you are allergic. The cheese will be pasteurised (it has to state if not) and even if it wasn’t you’re eating it cooked so that doesn’t matter. The tiny bit of red wine they cook with will cook off in the preparation and after another reheat there will be zero alcohol in it and bechamel sauce is just butter flour and milk.
Do take a look at the nhs website or Tommy’s for what you can’t eat when pregnant- there’s actually very little.
There are no stupid questions especially about food while you're pregnant. Assuming all the dairy in use is pasteurised then you should be fine. At the point of cooking the red wine it is no longer alcoholic so you are safe x