I guess it depends.
In Material Design, they should be the same width. Here you can see the segmented buttons with icons because the content width is more noticeable:
But you can see that without icons, it's still the same:
Carbon Design System is the same:
However, there are examples where this is not the case, such as Bootstrap:
However, in your specific case, you have very long labels against very short ones, so you could use that to your advantage in order to provide a quick scan.
In short: while in general, segmented buttons tend to be the same width, it's not necessarily the case, and I think your use case merits using different sizes.
EDIT: As @exp mentions, there is another component in Carbon that differs from the one I mentioned. From what I understand, I still believe the component I mentioned is the correct one for your use case. However, if you need to toggle between content views, then the Content Switcher is the correct one.