Bring a pot of salted water to a boil for the pasta. Cook according to the directions, reserving 1 cup of the starchy pasta water once it’s finished.
Heat the olive oil in a large cast iron or oven safe skillet over medium heat. Add the shallots with a pinch of salt and pepper. Cook, stirring often, until softened, about 3 minutes.
Add in the spinach. You might need to do this in batches so it doesn’t overflow. Stir and cook until the spinach wilts, about 5 to 6 minutes. Stir in the garlic.
Add in the cream cheese, stirring until it melts.
Stream in ¾ of the pasta water. Add in the penne, most of the cheese (I reserve about ⅓ cup for the top) and the artichoke hearts. Stir until evenly combined. Some of the cheese will melt here too.
Preheat the oven on your broiler to high.
Add the remaining cheese on top, sprinkling it all over.
Stick the pan under the broiler for 2 to 3 minutes, watching the entire time so it doesn’t burn. It may even need an additional minute or 2! Just keep an eye on it.
Remove from the oven and let cool slightly. Serve immediately with parmesan on top.