The evolutionary dynamics remain largely unknown for spatial populations where individuals are more likely to interact repeatedly. Under this settings, individuals can make their decisions to cooperate or not based on the decisions previously adopted by others in their neighborhoods. Using repeated public goods game, we construct a spatial model and use a statistical physics approach to study the coevolutionary dynamics of aspiration and strategy. Individuals each have an aspiration towards the groups they are involved. According to the outcome of each group, individuals have assessment of whether their aspirations are satisfied. If satisfied, they cooperate next round. Otherwise, they switch to defecting. Results show threshold phenomenon for harsh collective dilemma: cooperators sticking to high levels of aspiration can prevail over defectors, while cooperators with other levels are invariably wiped out. When the collective dilemma is relaxed, cooperation is greatly facilitated by inducing a high level of diversity of aspiration. Snapshots further show the spatial patterns of how this coevolutionary process leads to the emergence of an optimal solution associated with aspiration level, whose corresponding strategy are most prevalent. This optimal solution lies in one and the highest aspiration level allowed, and depends on the intensity of the social dilemma. By removing the memory effect, our results also confirm that repeated interactions can promote cooperation, but to a limited degree.