This issue is created by the wrong usage of i inside the lambda definition, you would need to bind i for each created function.
This should solve the issue:
train_loader = np.empty((2), dtype=np.object)
for i in range(2):
    train_loader[i] = torch.utils.data.DataLoader(
      torchvision.datasets.MNIST('PATH', train=True, download=False,
                                 transform=torchvision.transforms.Compose([
                                    torchvision.transforms.Lambda(lambda x, i=i:
                                        torchvision.transforms.functional.affine(
                                            img = x,
                                            angle = 90* i,
                                            translate = (0,0),
                                            scale = 1,
                                            shear = 0
                                        )
                                    ),
                                    torchvision.transforms.ToTensor(),
                                 ])
                                ),
      batch_size=1, shuffle=False)