Correct, you can stack pantry cabinets on top of base cabinets. Just be sure to order the pantry cabinets with no toe kick.
As long as the widths and depths of your wall, base, and tall cabinets match, they can be stacked in various configurations. Typically, base cabinets are kept on the bottom since they have open tops with stretchers, while wall and tall cabinets have fully closed tops.
That said, your design will work just fine.
Attachments:
