"On Earth, insects reached their biggest sizes about 300 million years ago during the late Carboniferous and early Permian periods. This was the reign of the predatory griffinflies, giant dragonfly-like insects with wingspans of up to 28 inches (70 centimeters)."
Quoted from https://news.ucsc.edu/2012/06/giant-insects.html
Scientists have recently discovered that this was a period when the Earth's oxygen levels were more than twice what they are today. Insects like all living creatures, rely on oxygen for their energy needs but they absorb their oxygen directly through pores in their epidermis called spiracles which feed through a network of trachea to deliver this oxygen to all parts of their body. Absorption of oxygen may well have been more efficient for insects of this period than they are for mammals today.
The other interesting property about oxygen is that it's atomic structure makes it one of the most electronegative elements on earth. This refers to the elements ability to tear off electrons from other atoms. This property makes oxygen in its pure mono-atomic state, highly volatile, lending itself to chemical reactions which yield huge amounts of energy!!!
This is key as it provides an environment conducive to the evolution of brain power.
Other environmental drivers will be needed. This may come from a need to hunt for and outwit their prey.
Take a look at the evolution of birds from reptiles to study how again intelligence became efficient, weight for weight of brain matter. Then draw parallels to the evolution of your arachnids.