Bring a large pot of salted water to a boil and cook the elbow macaroni according to package directions until al dente; drain and set aside.
In a large saucepan over medium heat, melt the butter. Add the finely minced sweet onion and sauté until softened, about 5 minutes.
Whisk the flour into the onions and butter until the mixture is golden and combined, about 1 minute.
Gradually whisk in the whole milk, then the 2% milk. Increase heat to medium-high and bring the sauce to a gentle boil, whisking constantly, until it is smooth and thickened, about 10 to 12 minutes.
Season the sauce with kosher salt and freshly ground black pepper to taste.
Add the spinach to the sauce and stir until wilted.
Stir in the shredded cheddar, smoked gouda, and crumbled goat cheese until fully melted and the sauce is smooth.
Add the cooked macaroni to the cheese sauce and stir until evenly coated. Taste and adjust seasoning if needed, then serve immediately.