Meal type (breakfast, lunch, etc.) seems to be the header of the form rather than a setting.
In the first solution all meals are displayed in a dropdown under one form, and the rest of the form varies depending on what meal the user selects. When choosing a meal the layout configuration changes. This could confuse users, some might even want to keep settings from "Lunch" while selecting "Breakfast", because the setting is in the same form.
The second solution is a tab layout where the user selects between different forms, and each form has its own configuration and options; so it is better in that sense.
On a side note, I would try to avoid using checkboxes and toggles in the same page. In this case I think checkboxes are more appropriate.