In my opinion, there is a huge relationship. The basis for this is hidden in the genome. If the genes required for adaptation are very flexible or have a wide range of capabilities, that species will easily adapt to various environments. It produces many subspecies. If the adaptation capacity of the genes is weak, it can survive in a more limited environment. It can easily disappear due to environmental changes.
Extinction occurs when a taxon is unable to persist in its environment - normally due to changing environmental pressures for which it lacks the adaptations to deal with.
Species richness is normally defined as the simple count of species present, while species diversity is a mathematically-calculated index of the species present and their population size (such as the Shannon-Weaver indix).
Extinction is often caused by a change in environmental conditions. When conditions change, some species possess adaptations that allow them to survive and reproduce, while others do not. If the environment changes slowly enough, species will sometimes evolve the necessary adaptations, over many generations. Evolution is not the same as adaptation or natural selection. Natural selection is a mechanism, or cause, of evolution. Adaptations are physical or behavioral traits that make an organism better suited to its environment. Heritable variation comes from random mutations. If it changes more rapidly, few adaptive walks will be completed, and the population will be poorly adapted most of the time. If it changes very rapidly selection may be inadequate to restore adaptation quickly enough, and the population will dwindle and eventually become extinct. The decrease in population size that typically precedes extinction can be due to environmental change including increased predation, because individuals of the species are outcompeted by other species, and/or because they succumbed to disease. Species richness is simply the number of species in a community. Species diversity is more complex, and includes a measure of the number of species in a community, and a measure of the abundance of each species. Both are important conservation targets species richness contributes to ecosystem functioning and human wellbeing, while genetic diversity allows those species to respond to changes in their environment and persist in the long-term. Species diversity is the number of different species (species richness) combined with the relative abundance of individuals within each of those species in a given area. Species richness is the number of different species contained in a community.Ecosystems with higher species diversity tends to be more resilient. If an ecosystem has a diverse community of organisms, they are not all likely to be affected by a disturbance in the same way. The relationship between species richness and ecosystem services is that greater species richness results in more ecosystem services. An ecosystem is a complex set of interconnected systems where each organism depends on others for survival.