StackView does not really work well with constraints, as they kind of destroy the purpose of stack views. Since the vertical inner stackView is inside a horizontal stackView with the imageView. When you give imageView hard constraints, in order to satisfy these constraints and keep the height & width values of stackViews at same level with imageView and inner stackView, the inner stackView cannot expand and it's height and you cannot get the behaviour you want. So as also mentioned in the comments, it is better to achieve your design without stackViews.
PS: I'm not saying stackViews cannot be used with constraints in their subViews. It can be done, and sometimes allow programmers to successfully achieve their goal, but you will always get debugger warnings due to conflicting constraints about the views with constraints inside a stackView.