Hi,
the following will get what you want,
Z = X*y.unsqueeze(2)

Which are equal,
>>> X*y.unsqueeze(2)
tensor([[[  10,   20,   30,   40],
         [ 500,  600,  700,  800],
         [9000, 9000, 9000, 9000]],

        [[  20,   40,   60,   80],
         [ 200,  240,  280,  320],
         [ 540,  540,  540,  540]]])
>>> Z
tensor([[[  10,   20,   30,   40],
         [ 500,  600,  700,  800],
         [9000, 9000, 9000, 9000]],

        [[  20,   40,   60,   80],
         [ 200,  240,  280,  320],
         [ 540,  540,  540,  540]]])