Does Judaism encourage secular learning? Maths, Sciences: Biology, Chemistry, Automata Theory et cetera . . .
You tell me.
"The group comprises the religious people who understand the depth of the Torah....Such people, who claim to be extraordinary; avoid contemplation of the causes of phenomena and thereby are ignorant of them, or most of them. Through intuition, or through Tradition, they know of the existence of the First Cause, God. They believe that thought and study of the channels He uses will lead them to deny His involvement and the principles of His Torah, as occurred with the heretical philosophers and their adherents. They (of this group) believe that proper religious faith is the denial of secondary causes and intermediate channels of God's actions.
This leads them to remain ignorant of the laws of nature and to deny facts observed by the intellect and experienced by the senses. They believe that this is the requisite faith of the Torah and that only through such faith can a servant of God properly rely on Him. In this way, they have earned the mockery and derision of the educated. If a distinguished and learned Jew holds such a belief, I and any fair-minded person consider that to be a desecration of God's Name (hillul Hashem)..."
Chapter 8 - Reliance of the Guide to Serving God by Rabbeinu Avraham ha Rambam Translation: Raabi Yaakov Wincelberg
There are varying viewpoints about this subject today depending upon who you are learning from.
But generally, the 7 secular sciences are considered to be "novolot chochma", unripened wisdom. This is like is found in both Sefer Kol HaTur which is purported to be the teaching of the Vilna Gaon and can also be found in the teachings of the Maharal of Prague.
You can think of this in relation to the sulam, the ladder in Yaacov's vision at Beit El. The rungs of the ladder are different types of wisdom. Some are closer to the material, physical plane of existence and others are closer to the spiritual. The higher wisdom, the wisdom of the Torah is farther away from physical, material existence. But in order to climb the ladder, you need to use all the rungs. You don't skip.
Having an initial and primary basis in holy studies is essential, especially for young children. But to have a mature understanding of the wisdom of the Torah, also requires broad knowledge of the secular sciences. They are complementary to each other.
This approach was also favored by Ramban who strove for practical knowledge of how things worked in order to properly grasp the decisions of poskim from earlier generations. That knowledge of how things behave in the physical plane of existence cannot be learned above. This was what G-d explained to the angels when they objected to Moshe taking the Torah from above to be given to the Jewish people. The angels have little or no connection to the physical. The Torah is intended to be used in the physical plane.
On a deeper level, Rabbi Yosef Gikatilla in Sefer Ginat Egoz relates this to the doubling letters in the Hebrew alphabet. There is nothing that exists in the material world that doesn't have its root and source above. This "fractal" kind of relationship is derived from the doubling letters. Knowledge of both, the upper wisdom and the lower wisdom gives complete and mature understanding.
Pirkei Avot 3:18:
רבי אליעזר בן חסמא אומר, קנין ופתחי נדה, הן הן גופי הלכות .תקופות וגמטריאות, פרפראות לחכמה.
Rabbi Eliezer ben Chisma says: the laws of Kinin [bird offerings] and Niddah [menstruation], these are the body of the laws. Astronomical calculations and Gematria [numerical calculations] are the condiments to wisdom.
Here, "astronomical calculations" is not the greatest translation. What is meant is according to commentary Bartenura, is the orbit of the planets and constellations. In a sense, it is part of astronomy.
Gematria refers to the art of using the numerical equivalence of the Hebrew letters (Aleph = 1; Tav = 400, etc.) and figuring out how a word has the same numerical equivalent as another word. Obviously, this does involve basic "mathematics", in terms of being able to count.
As for math, in particular, we see numerous places in Tana"ch were counting and percentages are used, so, knowing that area of math is necessary to be able to perform mitzvoth.
Getting back to this adage, Rabbi Eliezer calls these two fields "condiments". This term is used in comparison to the beginning of the adage that discusses the two things that are essential (basics) of Torah laws. The last two are "extras" because, according to Ikar Tosfot Yom Tov, these items (planet movements and gematria) helps one's heart be drawn to appreciate G-d's wisdom. See the rest of the commentary for a more detailed explanation of this concept.
I can't state, per se, whether math and astronomy would be considered "secular" in this concept. But, based on Rabbi Eliezer's teaching it appears that it was encouraged then, and he seems to encourage a knowledge of these areas now.
if it's necessary for earning a livelihood then obviously yes.
if it's necessary for one's mental balance as some kind of outlet then perhaps and depends to what extent.
if it's just to kill time then no.
consult with LOA. many factors involved and each person is different.