John Green is open about his struggles with anxiety and obsessive-compulsive disorder. He's said that he doesn't manifest himself the same as Aza, but he does have thought spirals. He had a terrible period for a few months after writing The Fault In Our Stars.
The phrase "Turtles all the way down" is an expression of the problem of infinite regress. The saying alludes to the mythological idea of a World Turtle that supports a flat Earth on its back. It suggests that this turtle rests on the back of an even larger turtle, which itself is part of a column of increasingly large turtles that continues indefinitely.
Aza's mom singing to her "We're here because we're here because we're here because we're here..." is referencing a story told by John Green in The Anthropecene Reviewed about soldiers in WWI singing in the trenches about the futility war. "By Christmas of 1916, soldiers didn't want truces--the devastating losses of the war, and the growing use of poison gas, had embittered the combatants. But many also had no idea why they were fighting and dying for tiny patches of ground so far from home. And in the British trenches, soldiers began to sing the tune of Auld Lang Syne with different words: We're here because we're here because we're here because we're here. Here was a world without whys, where life was meaninglessness all the way down."
John Green worked on the book at a local Starbucks in Indianapolis. Across the street from the Starbucks is an Applebee's, which features prominently as the hangout for Aza and her friends. (He also wrote "The Fault In Our Stars" at the same Starbucks. Across the street is a Speedway, which features prominently in that story.)
Isabela Merced previously starred in another John Green adaptation, Let It Snow - Innamorarsi sotto la neve (2019).