Prepare the spaghetti according to package directions. Drain and set aside.
In a large skillet over medium-high heat, add the olive oil. When the oil is hot, add the onion and carrots. Cook, stirring frequently, for 3 to 5 minutes until the vegetables begin to soften.
Add the chopped artichoke hearts and continue cooking for another 2 minutes, until heated through.
Add the minced garlic and cook for an additional 30 seconds.
Add the vegetable broth and continue cooking for 5 minutes, or until the carrots are fork-tender and the broth has reduced slightly. Season with salt and pepper to taste.
Add the cooked spaghetti to the pan and toss gently to combine everything. Add the pesto and toss again. Squeeze the lemon wedges over the top, finish with fresh parsley, and serve warm.