Season chicken on both sides with salt, pepper, and ras el hanout. In a large skillet over medium-high heat, heat 1 Tbsp. oil. Add chicken and cook, turning halfway through, until golden brown and an instant-read thermometer inserted into thickest part registers 165°, about 4 minutes per side. Transfer to a cutting board.
In same skillet over medium heat, heat remaining 1 Tbsp. oil. Add shallot and mushrooms and cook, stirring frequently, until browned, about 5 minutes. Add garlic, harissa, and thyme and cook, stirring, until fragrant, 1 to 2 minutes more. Add broth and scrape up any browned bits on bottom of pan. Slowly add half-and-half, stirring to combine. Bring to a simmer; season with salt and pepper. Stir in gnocchi and return to simmer. Cook, stirring occasionally, until gnocchi is cooked through and tender, about 10 minutes (cook time will be 2 to 3 minutes longer for frozen gnocchi).
Add ½ cup feta and stir until melted, then add spinach and stir until wilted, about 2 minutes.
Slice chicken and return to skillet. Top with basil and remaining ¼ cup feta.
