Combine water, chicken, whole onion, and rosemary in a large stockpot; bring to a rolling boil and cook until chicken is no longer pink at the bone and the juices run clear, about 1 hour. An instant-read thermometer inserted into the thickest part of the thigh, near the bone should read 165 degrees F (74 degrees C). Remove stockpot from heat and allow chicken to cool until easily handled, about 15 minutes.
Remove chicken and onion from stockpot. Remove chicken meat from bones and chop or shred meat; discard carcass and skin. Chop onion if desired. Return chicken meat and onion to stockpot with water.
Mix carrots, celery, garlic, and sea salt with the chicken mixture; bring to a boil and cook until carrots and celery are tender, 10 to 15 minutes. Reduce heat to medium-low; add egg noodles and cook until noodles are cooked through but firm to the bite, about 5 minutes. Add spinach to soup and cook until wilted, 1 to 2 minutes.