When an airline defines the maximum sizes of an item like e.g "x=30 cm, y=40 cm, z=10 cm" are the x and y axis sizes exchangeable? for instance could I bring an item whose dimensions are x=40 cm, y=30 cm, z=10 cm?
Yes. All they're asking is that one side is no greater than 40, another 30, and another 10. They're not asking for it to be facing a particular direction.
Picture a shoe box. X (width - facing you) of 33cm, 19cm (Y) depth, and 10cm (Z - height).
Now walk around it to view from the side. Now the width is 19cm (X) facing you, the depth is 33cm, and the height Z is still 10cm. It still meets their requirements and for the airlines with an example holder, like below, it'll still fit if you turn it around.