Given the example:
I have trouble speaking English.
Can we use both present participle (speaking) and to-infinitive (to speak) after have trouble? If both are allowed, do the two have the same meaning or not?
No, you may not use the to-infinitive after to have trouble. You may only use the -ing form. You can think of it as an abbreviated version of this:
And for the most part, to-infinitives make poor objects of prepositions; for that were gerunds invented.
In many other languages, what might usually be translated as "to verb" in English is in fact one word – parler, sprechen, говорить etc. – whilst in English they are two words, and so usage naturally evolved differently. The fact that the verbal noun is identical to the infinitive in French, German, Russian etc., but the present participle in English shows that they are thought of differently in these languages. Cases are arbitrarily split in English between the infinitive and the verbal noun, which are identical when translated into most other languages. There are cases, e.g. "I want to speak", where to is used as a nonce to form the infinitive, where that form is used. But there are also cases where the verbal noun, i.e. speaking, e.g. I have trouble speaking English, is idiomatic. It really depends on the verb, and has developed through usage, rather than through strict rules.