Leveraging Scene Embeddings for Gradient-Based Motion Planning in Latent Space