There are 2 opinions in Shulchan Aruch Orach Chaim 325,4 whether one can benefit from the bread baked by a Gentile bakery when most of its customers are gentile* straight after Shabbos/Yom Tov.
- There are those who permit since the gentile made the bread in principal for other gentiles for whom prohibition of baking is of no relevance, the bread is not considered Mukze even though a prohibited melacha (on pesach baking chametz is not for the sake of Yomtov and forbidden) was performed. One may buy Pas palter as no kosher bread is available or kosher bread sold to a Gentile and brought back, is of poorer quality as it is old or it has been frozen (Matza is also poor form of bread lechem Oni).** This is the opinion of the Rosh (as explained by the Taz)
- But some forbid because they consider the wheat Muktze when Jewish people benefit regardless of whether it was baked for Gentiles sake. Mukze here means the wheat when Yom Tov commenced was not ready eat as bread without forbidden melacha changes of threshing grinding kneading and baking shelo letzorech (not for the sake of Yomtov). This is the opinion of Rabeinu Tam (see Taz)
The Mishna Brura explains when we can rely on the lenient opinion:
(יח) ובשעת הדחק או לצורך מצוה כגון סעודת ברית מילה או לצורך ברכת המוציא יש לסמוך על המתירים
- כגון שדר בכפר יחידי שא"א לשאול פת מחבירו [אחרונים]:
A "situation of need" for example if he lives in a place where he has no bread available and he cannot borrow bread from his Jewish friend** he can rely on the lenient opinion.
So if anyone Jewish in a Non-Jewish Town cannot find Matza (which is also staple diet like bread) left over from Pesach (after asking their neighbors) they can rely on the lenient opinion and buy bread from the Gentile Bakery straight after Yomtov ends.
This would not apply for example to an arab (gentile) bakery (Supervised ingredients) in Israel where most of his customers that he is baking for on Motzei Pesach would be Jewish. So if the arab made bread in a bakery en-masse on the 7th day Pesach (in Israel) for Motzei Yomtov on Shabbos (even though there is no Pas Yisroel bread available and kosher ingredients are used), he is mostly making it for the sake of the Jews so this is Amira leakum* and forbidden (even from an existing flame which the Jew lit). And if a Jew asked a gentile to specifically make him bread privately for Motzei Yomtov this is privately baked and completely forbidden to eat even during the year on chol days. ***
I think the only permitted way in Israel of eating bread on Shabbos on Motzei Yom Tov, is to eat older leftover Bread that an arab gives to him (because then its baked by a Gentile on chol Hamoed for the sake of gentiles) but one would pay only after Shabbos. (this is theoretical, I am not aware of any Hechsher on arab owned bakery in Israel where this happens).
{*source Mishna Machshirin 2,5: עיר שישראל וגויים דרין בתוכה, והיה בה מרחץ מרחצת בשבת--אם רוב גויים, רוחץ מיד; אם רוב ישראל, ימתין כדי שייחמו חמין; מחצה למחצה, ימתין כדי שייחמו חמין
i.e if their are more gentiles than Jews in that town one may use a bath house straight after shabbos, as it was heated up for the Gentiles sake. But when their are more Jews than non Jews the Bath house owner is lighting the fire for mainly the Jews and it is prohibited to derive benefit from this because of Amira leakum.
**source - Shulchan Aruch Yoreh Dea 112,2
יש מקומות שמקילין בדבר ולוקחים פת מנחתום העובד כוכבים, במקום שאין שם נחתום ישראל, מפני שהיא שעת הדחק. (וי"א דאפילו במקום שפת ישראל מצוי, שרי) (ב"י לדעת המרדכי וסמ"ק והג"א ומהרי"א ואו"ה ריש כלל מ"ד).
Note that the rema would hold that Pas Palter - bread baked en masse is permitted even where good kosher bread is available.
*** cont. SA YD 112,2אבל פת של בעלי בתים, אין שם מי שמורה בה להקל, שעיקר הגזירה משום חתנות, ואם יאכל פת בעלי בתים יבא לסעוד אצלם.}