1. Is Hinduism only for Brahmin and Kshatriya men? What does scriptures say about it?
No. Hinduism is for all the four castes and even mixed castes (although not encouraged).
But, mostly, the major focus as per most texts and their interpretations by traditional, orthodox acharyas is towards the birth-based varna system.
Also, one can only be a Hindu, if born to Hindu-parents, as per traditional viewpoints.
It's based on the doctrine of the chatur Varṇāśrama dharma.
Canonical texts enjoin vertical divisions amongst people in the form of varna (popularly misnomered as caste), as per their karma (previous birth + current), and the horizontal division amongst each varna as phases of life viz. the Brahmacharyam, Grihastha, Vanaprastha and Sannyasi.
Note that: All the four āśramas may not be valid for Shudras and Vaishyas. I am not entirely sure about that
So, each varna has their prescribed Dharma (Agni Purāṇa 151.2-9), and one ought to follow that.
Srimada Bhagvada Gita 18.45a
स्वे स्वे कर्मण्यभिरतः संसिद्धिं लभते नरः।
Being devoted to his own duty, man attains complete success.
And eventually, step by step, as per merits, a person is said to raise in their varna and attain heaven or salvation, as per their karma.
This is how Brahma Purāṇa states the above fact.
Chapter 121 - Manifestation of Māyā, Brahma-purāṇa
संसारेऽस्मिन्महाघोरे सर्वभूतभयावहे । महामोहकरे नॄणां नानादुः खशताकुले
॥ २२९.४ ॥ तिर्यग्योनिसहस्रेषु जायमानः पुनः पुनः । कथंचिल्लभते जन्म
देही मानुष्यकं द्विजाः ॥ २२९.५ ॥
- 4 & 5. The worldly existence is extremely terrible. It strikes terror
into all living beings. It causes sorrow to men. Hundreds of miseries
abound in it. A soul is born again and again in thousands of species
of lower living organisms, O brahmins, and with great difficulty it
attains human birth.
मानुषत्वेऽपि विप्रत्वं विप्रत्वेऽपि विवेकिता । विवेकाद्धर्मबुद्धिस्तु
बुद्ध्या तु श्रेयसां ग्रहः ॥ २२९.६ ॥
- After human birth, he attains brahmin-hood, power of discrimination, a
sense of piety, and happiness in successive births.
यावत्पापक्षयं पुंसां न भवेज्जन्मसंचितम् । तावन्न जायते भक्तिर्वासुदेवे
जगन्मये ॥ २२९.७ ॥
- Until the ultimate destruction of all sins of men accumulated in
different births, devotion to Vāsudeva who is identical with the
universe, is not possible.
So, basis above passage, an average person pass through successive births, and through merits acquired in each preceding birth he becomes a Brahmin, and then with devotion towards the God, such a person will attain Moksha.
This is for normal people, for their are always exceptions to the the above, but that must be treated as exception, and not a generalized theory.
2. Can people of other castes and foreigners go to heaven?
As per the Hindu worldview, everyone can attain Moksha, but as explained above not immediately, it's a process that might span thousands or lakhs of birth.
As regards the question on non-Hindu people reaching heaven, from Hinduism worldview, since their after-death rites are not performed as per Vedic injunctions, thus they cannot attain heaven, and roam as pretas, as discussed in this answer