Broadcasting starts with the rightmost indices and can succeed if and only if the dimensions are equal, one of them is 1 or it does not exist. You could either permute the dims of the matrix like this
b = 1
d = 4
n = 2
mat1 = torch.randn((1, 4))
mat2 = torch.randn((1, 4, 2, 2)).permute(2, 3, 0 ,1) # swap dims 0 with 2 and 1 with 3

mat3=mat1*mat2
mat3=permute(2, 3, 0, 1) # swap back the dims

mat3.shape
torch.Size([1, 4, 2, 2])

Or you can multiply using the einsum notation, like this:
b = 1
d = 4
n = 2
mat1 = torch.randn((1, 4))
mat2 = torch.randn((1, 4, 2, 2))

mat3 = torch.einsum('bd, bdij -> bdij', mat1, mat2).

mat3.shape
torch.Size([1, 4, 2, 2])