In a medium bowl, combine the chopped spinach, artichoke hearts, cream cheese, mozzarella cheese, Parmesan cheese, garlic powder, onion powder, salt, and pepper. Mix until well combined.
Spread butter on one side of each slice of sourdough bread.
Place one slice of bread, butter side down, in a skillet over medium heat.
Spoon the spinach and artichoke mixture onto the bread in the skillet, spreading it evenly.
Top with the second slice of bread, butter side up.
Cook for about 3-4 minutes until the bottom slice is golden brown. Carefully flip the sandwich and cook for another 3-4 minutes until the other side is golden and the cheese is melted.
Remove from the skillet, let cool for a minute, then slice in half and serve warm.